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-create.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pthread/pt-create.c') diff --git a/pthread/pt-create.c b/pthread/pt-create.c index 727fbac..95df677 100644 --- a/pthread/pt-create.c +++ b/pthread/pt-create.c @@ -1,5 +1,5 @@ /* Thread creation. - Copyright (C) 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -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_t __pthread_total; +uatomic_max_t __pthread_total; /* The entry-point for new threads. */ @@ -173,7 +173,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_inc (&__pthread_total); + atomic_increment (&__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 @@ -200,7 +200,7 @@ __pthread_create_internal (struct __pthread **thread, failed_starting: __pthread_setid (pthread->thread, NULL); - __atomic_dec (&__pthread_total); + atomic_decrement (&__pthread_total); failed_sigstate: __pthread_sigstate_destroy (pthread); failed_setup: -- cgit v1.2.3