From 61585a1da2ce36b0db1cbc9673456205d5111e78 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Tue, 12 Aug 2008 15:07:50 +0000 Subject: 2008-08-12 Neal H. Walfield Merge changes from hurd-l4 fork. * Makefile (SRCS): Add pt-startup.c and pt-mutex-transfer-np.c. (sysdeps_headers): Add pthread-np.h. 2008-08-12 Neal H. Walfield * sysdeps/generic/bits/pthread-np.h: New file. 2008-08-12 Neal H. Walfield * sysdeps/generic/pt-startup.c: New file. 2008-08-12 Neal H. Walfield * sysdeps/generic/bits/mutex.h (__PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Define. (__PTHREAD_MUTEX_RECURSIVE_INITIALIZER): Don't define. * include/pthread/pthread.h (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) [__USE_GNU]: Define. (PTHREAD_MUTEX_RECURSIVE_INITIALIZER_NP): Don't define. 2008-08-12 Neal H. Walfield * include/pthread/pthread.h: Include . (__extern_inline): If not defined, define appropriately. 2008-06-01 Neal H. Walfield * include/pthread/pthread.h (PTHREAD_MUTEX_RECURSIVE_INITIALIZER_NP): New definition. * sysdeps/generic/bits/mutex.h (__PTHREAD_MUTEX_RECURSIVE_INITIALIZER): New definition. * sysdeps/generic/bits/mutex-attr.h (__pthread_recursive_mutexattr): New definition. * sysdeps/generic/pt-mutexattr.c (__pthread_recursive_mutexattr): New declaration. * sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): If ATTR is &__PTHREAD_RECURSIVE_MUTEXATTR, don't allocate a copy, just save in MUTEX->ATTR. * sysdeps/generic/pt-mutex-destroy.c (_pthread_mutex_destroy): If MUTEX->ATTR is &__PTHREAD_RECURSIVE_MUTEXATTR, don't free it. 2008-05-29 Thomas Schwinge * sysdeps/generic/sem-timedwait.c: Don't include . 2008-05-21 Neal H. Walfield * include/pthread/pthread.h: Include . 2008-03-01 Neal H. Walfield * sysdeps/generic/pt-mutex-transfer-np.c: New file. * pthread/pt-self.c (pthread_self): Assert that SELF is not NULL. 2007-12-23 Neal H. Walfield * pthread/pt-join.c (pthread_join): Cast argument to pthread_cleanup_push to avoid warning. 2007-11-23 Neal H. Walfield * pthread/pt-internal.h (__pthread_startup): Add declaration. * pthread/pt-create.c (entry_point): Call __pthread_startup. --- pthread/pt-create.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pthread/pt-create.c') diff --git a/pthread/pt-create.c b/pthread/pt-create.c index 5bb9f1f..210f967 100644 --- a/pthread/pt-create.c +++ b/pthread/pt-create.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include @@ -33,7 +33,7 @@ /* The total number of pthreads currently active. This is defined here since it would be really stupid to have a threads-using program that doesn't call `pthread_create'. */ -atomic_fast32_t __pthread_total; +__atomic_t __pthread_total; /* The entry-point for new threads. */ @@ -163,7 +163,7 @@ __pthread_create_internal (struct __pthread **thread, the number of threads from within the new thread isn't an option since this thread might return and call `pthread_exit' before the new thread runs. */ - atomic_increment (&__pthread_total); + __atomic_inc (&__pthread_total); /* Store a pointer to this thread in the thread ID lookup table. We could use __thread_setid, however, we only lock for reading as no @@ -190,7 +190,7 @@ __pthread_create_internal (struct __pthread **thread, failed_starting: __pthread_setid (pthread->thread, NULL); - atomic_decrement (&__pthread_total); + __atomic_dec (&__pthread_total); failed_sigstate: __pthread_sigstate_destroy (pthread); failed_setup: -- cgit v1.2.3