summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r--newlib/libc/include/sys/features.h3
-rw-r--r--newlib/libc/include/sys/types.h30
2 files changed, 33 insertions, 0 deletions
diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h
index 6754f1e9d..7dc948668 100644
--- a/newlib/libc/include/sys/features.h
+++ b/newlib/libc/include/sys/features.h
@@ -45,6 +45,9 @@ extern "C" {
#define _POSIX_SHARED_MEMORY_OBJECTS 1
#define _POSIX_SYNCHRONIZED_IO 1
#define _POSIX_TIMERS 1
+#define _POSIX_BARRIERS 200112L
+#define _POSIX_READER_WRITER_LOCKS 200112L
+#define _POSIX_SPIN_LOCKS 200112L
/* In P1003.1b but defined by drafts at least as early as P1003.1c/D10 */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 70d919a46..c1bff4793 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -371,6 +371,36 @@ typedef struct {
#endif
#endif /* defined(_POSIX_THREADS) */
+/* POSIX Barrier Types */
+
+#if defined(_POSIX_BARRIERS)
+typedef __uint32_t pthread_barrier_t; /* POSIX Barrier Object */
+typedef struct {
+ int is_initialized; /* is this structure initialized? */
+#if defined(_POSIX_THREAD_PROCESS_SHARED)
+ int process_shared; /* allow this to be shared amongst processes */
+#endif
+} pthread_barrierattr_t;
+#endif /* defined(_POSIX_BARRIERS) */
+
+/* POSIX Spin Lock Types */
+
+#if defined(_POSIX_SPIN_LOCKS)
+typedef __uint32_t pthread_spinlock_t; /* POSIX Spin Lock Object */
+#endif /* defined(_POSIX_SPIN_LOCKS) */
+
+/* POSIX Reader/Writer Lock Types */
+
+#if defined(_POSIX_READER_WRITER_LOCKS)
+typedef __uint32_t pthread_rwlock_t; /* POSIX RWLock Object */
+typedef struct {
+ int is_initialized; /* is this structure initialized? */
+#if defined(_POSIX_THREAD_PROCESS_SHARED)
+ int process_shared; /* allow this to be shared amongst processes */
+#endif
+} pthread_rwlockattr_t;
+#endif /* defined(_POSIX_READER_WRITER_LOCKS) */
+
#endif /* !__need_inttypes */
#undef __need_inttypes