Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include/llvm-libc-types/pthread_once_t.h')
-rw-r--r--libc/include/llvm-libc-types/pthread_once_t.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libc/include/llvm-libc-types/pthread_once_t.h b/libc/include/llvm-libc-types/pthread_once_t.h
new file mode 100644
index 000000000000..be5c139d0c0e
--- /dev/null
+++ b/libc/include/llvm-libc-types/pthread_once_t.h
@@ -0,0 +1,20 @@
+//===-- Definition of pthread_once_t type ---------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __LLVM_LIBC_TYPES_PTHREAD_ONCE_T_H__
+#define __LLVM_LIBC_TYPES_PTHREAD_ONCE_T_H__
+
+#include <llvm-libc-types/__futex_word.h>
+
+#ifdef __unix__
+typedef __futex_word pthread_once_t;
+#else
+#error "Once flag type not defined for the target platform."
+#endif
+
+#endif // __LLVM_LIBC_TYPES_PTHREAD_ONCE_T_H__