diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-19 00:47:53 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-19 00:47:53 +0100 |
commit | 1efaba2cd9eb0c5af4617c5be01a6b5e96d7d8a0 (patch) | |
tree | 02c0f399da54477fb9d042d28ca009ed8aca6f84 /pthread/pt-exit.c | |
parent | 332c0bf4bca963ee6f104634349546864ecf62e5 (diff) |
Remove bits/pt-atomic.h
* pthread/pt-create.c: Include <atomic.h> instead of <bits/pt-atomic.h>.
(__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 <atomic.h> instead of
<bits/pt-atomic.h>.
(__pthread_dealloc): Use atomic_decrement_and_test instead of
__atomic_dec_and_test.
* pthread/pt-exit.c: Include <atomic.h> instead of <bits/pt-atomic.h>.
(__pthread_exit): Use atomic_decrement_and_test instead of
__atomic_dec_and_test.
* pthread/pt-internal.h: Include <atomic.h> instead of
<bits/pt-atomic.h>.
(struct __pthread): Use unsigned int type for nr_refs field instead of
__atomic_t.
(__pthread_total): Use unsigned int type instead of nr_refs.
Diffstat (limited to 'pthread/pt-exit.c')
-rw-r--r-- | pthread/pt-exit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pthread/pt-exit.c b/pthread/pt-exit.c index a23a540..14e560e 100644 --- a/pthread/pt-exit.c +++ b/pthread/pt-exit.c @@ -23,7 +23,7 @@ #include <pt-internal.h> -#include <bits/pt-atomic.h> +#include <atomic.h> /* Terminate the current thread and make STATUS available to any @@ -49,7 +49,7 @@ __pthread_exit (void *status) /* Decrease the number of threads. We use an atomic operation to make sure that only the last thread calls `exit'. */ - if (__atomic_dec_and_test (&__pthread_total)) + if (atomic_decrement_and_test (&__pthread_total)) /* We are the last thread. */ exit (0); |