summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Threading.inc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Windows/Threading.inc')
-rw-r--r--llvm/lib/Support/Windows/Threading.inc24
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/Support/Windows/Threading.inc b/llvm/lib/Support/Windows/Threading.inc
deleted file mode 100644
index 196be890dbf..00000000000
--- a/llvm/lib/Support/Windows/Threading.inc
+++ /dev/null
@@ -1,24 +0,0 @@
- #include <windows.h>
-
-#ifdef MemoryFence
-// WinNT.h seems to define a MemoryFence macro.
-#undef MemoryFence
-#endif
-
-void llvm::call_once(once_flag &flag, void (*fptr)(void)) {
- while (flag != Done) {
- if (flag == Wait) {
- ::Sleep(1);
- continue;
- }
-
- sys::cas_flag old_val = sys::CompareAndSwap(&flag, Wait, Uninitialized);
- if (old_val == Uninitialized) {
- fptr();
- sys::MemoryFence();
- flag = Done;
- return;
- }
- }
- sys::MemoryFence();
-}
OpenPOWER on IntegriCloud