diff options
Diffstat (limited to 'libpthread/linuxthreads/sysdeps/pthread/pthread.h')
-rw-r--r-- | libpthread/linuxthreads/sysdeps/pthread/pthread.h | 46 |
1 files changed, 8 insertions, 38 deletions
diff --git a/libpthread/linuxthreads/sysdeps/pthread/pthread.h b/libpthread/linuxthreads/sysdeps/pthread/pthread.h index 46c1010c6..94ed95c99 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/pthread.h +++ b/libpthread/linuxthreads/sysdeps/pthread/pthread.h @@ -31,7 +31,7 @@ __BEGIN_DECLS /* Initializers. */ #define PTHREAD_MUTEX_INITIALIZER \ - {0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __LOCK_INITIALIZER} + {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, __LOCK_INITIALIZER} #ifdef __USE_GNU # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __LOCK_INITIALIZER} @@ -41,7 +41,7 @@ __BEGIN_DECLS {0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __LOCK_INITIALIZER} #endif -#define PTHREAD_COND_INITIALIZER {__LOCK_INITIALIZER, 0} +#define PTHREAD_COND_INITIALIZER {__LOCK_INITIALIZER, 0, "", 0} #if defined __USE_UNIX98 || defined __USE_XOPEN2K # define PTHREAD_RWLOCK_INITIALIZER \ @@ -82,13 +82,13 @@ enum enum { - PTHREAD_MUTEX_ADAPTIVE_NP, + PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, - PTHREAD_MUTEX_TIMED_NP + PTHREAD_MUTEX_ADAPTIVE_NP #ifdef __USE_UNIX98 , - PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_ADAPTIVE_NP, + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL @@ -256,7 +256,7 @@ extern int pthread_attr_getguardsize (const pthread_attr_t *__restrict /* Set the starting address of the stack of the thread to be created. Depending on whether the stack grows up or down the value must either be higher or lower than all the address in the memory block. The - minimal size of the block must be PTHREAD_STACK_SIZE. */ + minimal size of the block must be PTHREAD_STACK_MIN. */ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __THROW; @@ -280,7 +280,7 @@ extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, #endif /* Add information about the minimum stack size needed for the thread - to be started. This size must never be less than PTHREAD_STACK_SIZE + to be started. This size must never be less than PTHREAD_STACK_MIN and must also not exceed the system limits. */ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __THROW; @@ -290,16 +290,12 @@ extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __THROW; -#if 0 -/* Not yet implemented in uClibc! */ - #ifdef __USE_GNU /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread TH. It shall be called on uninitialized ATTR and destroyed with pthread_attr_destroy when no longer needed. */ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW; #endif -#endif /* Functions for scheduling control. */ @@ -323,11 +319,6 @@ extern int pthread_getconcurrency (void) __THROW; extern int pthread_setconcurrency (int __level) __THROW; #endif -#ifdef __USE_GNU -/* Same thing, different name */ -#define pthread_yield() sched_yield() -#endif - /* Functions for mutex handling. */ /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the @@ -394,25 +385,20 @@ extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict extern int pthread_cond_init (pthread_cond_t *__restrict __cond, const pthread_condattr_t *__restrict __cond_attr) __THROW; -libpthread_hidden_proto(pthread_cond_init) /* Destroy condition variable COND. */ extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW; -libpthread_hidden_proto(pthread_cond_destroy) /* Wake up one thread waiting for condition variable COND. */ extern int pthread_cond_signal (pthread_cond_t *__cond) __THROW; -libpthread_hidden_proto(pthread_cond_signal) /* Wake up all threads waiting for condition variables COND. */ extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW; -libpthread_hidden_proto(pthread_cond_broadcast) /* Wait for condition variable COND to be signaled or broadcast. MUTEX is assumed to be locked before. */ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex); -libpthread_hidden_proto(pthread_cond_wait) /* Wait for condition variable COND to be signaled or broadcast until ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an @@ -422,17 +408,14 @@ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime); -libpthread_hidden_proto(pthread_cond_timedwait) /* Functions for handling condition variable attributes. */ /* Initialize condition variable attribute ATTR. */ extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW; -libpthread_hidden_proto(pthread_condattr_init) /* Destroy condition variable attribute ATTR. */ extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW; -libpthread_hidden_proto(pthread_condattr_destroy) /* Get the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_getpshared (const pthread_condattr_t * @@ -512,9 +495,6 @@ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) __THROW; #endif -#if 0 -/* Not yet implemented in uClibc! */ - #ifdef __USE_XOPEN2K /* The IEEE Std. 1003.1j-2000 introduces functions to implement spinlocks. */ @@ -558,7 +538,6 @@ extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __THROW; #endif -#endif /* Functions for handling thread-specific data. */ @@ -650,9 +629,6 @@ extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer, extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer, void (*__routine) (void *), void *__arg) __THROW; -extern void __pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer, - void (*__routine) (void *), - void *__arg) __THROW; /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching @@ -663,19 +639,13 @@ extern void __pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buff extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer, int __execute) __THROW; -extern void __pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer, - int __execute) __THROW; #endif -#if 0 -/* Not yet implemented in uClibc! */ - #ifdef __USE_XOPEN2K /* Get ID of CPU-time clock for thread THREAD_ID. */ extern int pthread_getcpuclockid (pthread_t __thread_id, - clockid_t *__clock_id) __THROW; -#endif + __clockid_t *__clock_id) __THROW; #endif |