From 04a676f3c8d2443499f27612f69ee88e12089e61 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 22 Apr 2018 18:59:13 +0100 Subject: 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. --- libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libpthread/linuxthreads/sysdeps/pthread/bits') diff --git a/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h b/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h index 3eb592919..638dc75c9 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h +++ b/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h @@ -25,6 +25,8 @@ #define __need_schedparam #include +#define __SIZEOF_PTHREAD_CONDATTR_T 4 + /* Fast locks (not abstract because mutexes and conditions aren't abstract). */ struct _pthread_fastlock { @@ -63,12 +65,13 @@ typedef struct } pthread_cond_t; -/* Attribute for conditionally variables. */ -typedef struct +typedef union { - int __dummy; + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + int __align; } pthread_condattr_t; + /* Keys for thread-specific data */ typedef unsigned int pthread_key_t; -- cgit v1.2.3