summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/internals.h
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2018-04-22 18:59:13 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2018-04-22 19:01:57 +0100
commit04a676f3c8d2443499f27612f69ee88e12089e61 (patch)
treea6dac60812a5c5c748aa67330b81a36d667f3b9d /libpthread/linuxthreads/internals.h
parentd86bd35298834f3162459dde763f7976f5c2a523 (diff)
linuxthreads: implement pthread_condattr_{s,g}etclock()
More applications are using pthread_condattr_setclock()/ pthread_condattr_getclock() in their code. Port these two functions from NPTL over to be more compatible.
Diffstat (limited to 'libpthread/linuxthreads/internals.h')
-rw-r--r--libpthread/linuxthreads/internals.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/libpthread/linuxthreads/internals.h b/libpthread/linuxthreads/internals.h
index ab6b01528..720be8ec0 100644
--- a/libpthread/linuxthreads/internals.h
+++ b/libpthread/linuxthreads/internals.h
@@ -51,6 +51,25 @@
# define THREAD_SETMEM_NC(descr, member, value) descr->member = (value)
#endif
+/* Conditional variable attribute data structure. */
+struct pthread_condattr
+{
+ /* Combination of values:
+
+ Bit 0 : flag whether coditional variable will be shareable between
+ processes.
+
+ Bit 1-7: clock ID. */
+ int value;
+};
+
+/* The __NWAITERS field is used as a counter and to house the number
+ of bits for other purposes. COND_CLOCK_BITS is the number
+ of bits needed to represent the ID of the clock. COND_NWAITERS_SHIFT
+ is the number of bits reserved for other purposes like the clock. */
+#define COND_CLOCK_BITS 1
+#define COND_NWAITERS_SHIFT 1
+
/* Arguments passed to thread creation routine */
struct pthread_start_args {