From 9e56c380bce196b1e66fbed5c6684776f86307db Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Jan 2000 00:10:36 +0000 Subject: Update. * nscd/connections.c (dbs): Use PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP for .lock. Pretty printing. * nscd/hstcache.c (cache_addhst): Don't automatically add IPv6 address. Suggested by Philip Blundell. --- linuxthreads/manager.c | 4 ++-- linuxthreads/sysdeps/pthread/pthread.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'linuxthreads') diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c index 3a6f085..21a6928 100644 --- a/linuxthreads/manager.c +++ b/linuxthreads/manager.c @@ -315,8 +315,8 @@ static int pthread_allocate_stack(const pthread_attr_t *attr, else { /* Put a bad page at the bottom of the stack */ - guardaddr = (void *)new_thread_bottom - stacksize; guardsize = attr->__guardsize; + guardaddr = (void *)new_thread_bottom - guardsize; if (mmap ((caddr_t) guardaddr, guardsize, 0, MAP_FIXED, -1, 0) == MAP_FAILED) { @@ -512,7 +512,7 @@ static void pthread_free(pthread_descr th) /* One fewer threads in __pthread_handles */ __pthread_handles_num--; - /* Destroy read lock list, and list of free read lock structures. + /* Destroy read lock list, and list of free read lock structures. If the former is not empty, it means the thread exited while holding read locks! */ diff --git a/linuxthreads/sysdeps/pthread/pthread.h b/linuxthreads/sysdeps/pthread/pthread.h index 925db09..1ff7cba 100644 --- a/linuxthreads/sysdeps/pthread/pthread.h +++ b/linuxthreads/sysdeps/pthread/pthread.h @@ -43,6 +43,11 @@ __BEGIN_DECLS { {0, 0}, 0, NULL, NULL, NULL, \ PTHREAD_RWLOCK_DEFAULT_NP, PTHREAD_PROCESS_PRIVATE } #endif +#ifdef __USE_GNU +# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ + { {0, 0}, 0, NULL, NULL, NULL, \ + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_PROCESS_PRIVATE } +#endif /* Values for attributes. */ -- cgit v1.1