From 1efaba2cd9eb0c5af4617c5be01a6b5e96d7d8a0 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 19 Mar 2018 00:47:53 +0100 Subject: Remove bits/pt-atomic.h * pthread/pt-create.c: Include instead of . (__pthread_total): Change type from __atomic_t to unsigned int. (__pthread_create_internal): Use atomic_increment and atomic_decrement instead of __atomic_inc and __atomic_dec. * pthread/pt-dealloc.c: Include instead of . (__pthread_dealloc): Use atomic_decrement_and_test instead of __atomic_dec_and_test. * pthread/pt-exit.c: Include instead of . (__pthread_exit): Use atomic_decrement_and_test instead of __atomic_dec_and_test. * pthread/pt-internal.h: Include instead of . (struct __pthread): Use unsigned int type for nr_refs field instead of __atomic_t. (__pthread_total): Use unsigned int type instead of nr_refs. --- pthread/pt-dealloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pthread/pt-dealloc.c') diff --git a/pthread/pt-dealloc.c b/pthread/pt-dealloc.c index 806e078..1807a1d 100644 --- a/pthread/pt-dealloc.c +++ b/pthread/pt-dealloc.c @@ -22,7 +22,7 @@ #include -#include +#include /* List of thread structures corresponding to free thread IDs. */ extern struct __pthread *__pthread_free_threads; @@ -35,7 +35,7 @@ __pthread_dealloc (struct __pthread *pthread) { assert (pthread->state != PTHREAD_TERMINATED); - if (! __atomic_dec_and_test (&pthread->nr_refs)) + if (! atomic_decrement_and_test (&pthread->nr_refs)) return; /* Withdraw this thread from the thread ID lookup table. */ -- cgit v1.2.3