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-internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pthread/pt-internal.h') diff --git a/pthread/pt-internal.h b/pthread/pt-internal.h index 3024e64..24111ad 100644 --- a/pthread/pt-internal.h +++ b/pthread/pt-internal.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include @@ -76,7 +76,7 @@ struct __pthread /* Thread ID. */ pthread_t thread; - __atomic_t nr_refs; /* Detached threads have a self reference only, + unsigned int nr_refs; /* Detached threads have a self reference only, while joinable threads have two references. These are used to keep the structure valid at thread destruction. Detaching/joining a thread @@ -171,7 +171,7 @@ __pthread_dequeue (struct __pthread *thread) ) /* The total number of threads currently active. */ -extern __atomic_t __pthread_total; +extern unsigned int __pthread_total; /* The total number of thread IDs currently in use, or on the list of available thread IDs. */ -- cgit v1.2.3