From 347e1b07eb34cd37d37c3fd8f4a7e6645f3d0971 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 1 Nov 2004 17:04:00 +0000 Subject: 2004-11-01 Marcus Brinkmann * pthread/pt-internal.h: Include , not . (__pthread_total): Change type of declaration to uatomic_max_t. * pthread/pt-alloc.c: Include , not . (__pthread_free_threads): Change type to uatomicptr_t. (__pthread_alloc): Call atomic_compare_and_exchange_val_acq instead of __atomicptr_compare_and_swap. * pthread/pt-create.c: Include , not . (__pthread_total): Change type to uatomic_max_t. (__pthread_create_internal): Call atomic_increment, not __atomic_inc and atomic_decrement, not __atomic_dec. * pthread/pt-dealloc.c: Include , not . (__pthread_free_threads): Declare as uatomicptr_t. (__pthread_dealloc): Call atomic_compare_and_exchange_val_acq instead of __atomicptr_compare_and_swap. * pthread/pt-exit.c: Include , not . (pthread_exit): Call atomic_decrement_and_test instead of __atomic_dec_and_test. * sysdeps/l4/pt-create-np.c: Do not include . --- pthread/pt-dealloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pthread/pt-dealloc.c') diff --git a/pthread/pt-dealloc.c b/pthread/pt-dealloc.c index 1fc7a7b..f89f354 100644 --- a/pthread/pt-dealloc.c +++ b/pthread/pt-dealloc.c @@ -23,10 +23,10 @@ #include -#include +#include /* List of thread structures corresponding to free thread IDs. */ -extern __atomicptr_t __pthread_free_threads; +extern uatomicptr_t __pthread_free_threads; /* Deallocate the thread structure for PTHREAD and the resources associated with it. */ @@ -54,8 +54,8 @@ __pthread_dealloc (struct __pthread *pthread) while (1) { pthread->next = (struct __pthread *)__pthread_free_threads; - if (__atomicptr_compare_and_swap (&__pthread_free_threads, - pthread->next, pthread)) + if (atomic_compare_and_exchange_val_acq (&__pthread_free_threads, + pthread->next, pthread)) return; } -- cgit v1.2.3