about summary refs log tree commit diff
path: root/nixpkgs/pkgs/test/cc-wrapper/atomics.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/test/cc-wrapper/atomics.cc')
-rw-r--r--nixpkgs/pkgs/test/cc-wrapper/atomics.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/test/cc-wrapper/atomics.cc b/nixpkgs/pkgs/test/cc-wrapper/atomics.cc
new file mode 100644
index 000000000000..23601ae92f0b
--- /dev/null
+++ b/nixpkgs/pkgs/test/cc-wrapper/atomics.cc
@@ -0,0 +1,8 @@
+#include <atomic>
+#include <cstdint>
+
+int main()
+{
+  std::atomic_int x = {0};
+  return !std::atomic_is_lock_free(&x);
+}