aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/nptl
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-01-13 21:15:46 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-09 13:56:48 +0100
commite5ad0570682a663fe704f0a7bb1edb61fca11ecb (patch)
treeef2eff23cd9d361811bd77459aa63752b6ca5ff0 /sysdeps/nptl
parentf827f0e473d0aab4b34a5618a2a2ed89ecb88347 (diff)
downloadglibc-e5ad0570682a663fe704f0a7bb1edb61fca11ecb.zip
glibc-e5ad0570682a663fe704f0a7bb1edb61fca11ecb.tar.gz
glibc-e5ad0570682a663fe704f0a7bb1edb61fca11ecb.tar.bz2
nptl: Move nptl-specific types to separate header
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r--sysdeps/nptl/bits/thread-shared-types.h10
-rw-r--r--sysdeps/nptl/threads.h13
2 files changed, 15 insertions, 8 deletions
diff --git a/sysdeps/nptl/bits/thread-shared-types.h b/sysdeps/nptl/bits/thread-shared-types.h
index fd08b69..fbbdd0b 100644
--- a/sysdeps/nptl/bits/thread-shared-types.h
+++ b/sysdeps/nptl/bits/thread-shared-types.h
@@ -116,4 +116,14 @@ struct __pthread_cond_s
unsigned int __g_signals[2];
};
+typedef unsigned int __tss_t;
+typedef unsigned long int __thrd_t;
+
+typedef struct
+{
+ int __data __ONCE_ALIGNMENT;
+} __once_flag;
+
+#define __ONCE_FLAG_INIT { 0 }
+
#endif /* _THREAD_SHARED_TYPES_H */
diff --git a/sysdeps/nptl/threads.h b/sysdeps/nptl/threads.h
index 6d5e4bf..0ac489b 100644
--- a/sysdeps/nptl/threads.h
+++ b/sysdeps/nptl/threads.h
@@ -24,7 +24,7 @@
__BEGIN_DECLS
-#include <bits/pthreadtypes-arch.h>
+#include <bits/thread-shared-types.h>
#include <bits/types/struct_timespec.h>
#ifndef __cplusplus
@@ -32,10 +32,10 @@ __BEGIN_DECLS
#endif
#define TSS_DTOR_ITERATIONS 4
-typedef unsigned int tss_t;
+typedef __tss_t tss_t;
typedef void (*tss_dtor_t) (void*);
-typedef unsigned long int thrd_t;
+typedef __thrd_t thrd_t;
typedef int (*thrd_start_t) (void*);
/* Exit and error codes. */
@@ -56,11 +56,8 @@ enum
mtx_timed = 2
};
-typedef struct
-{
- int __data __ONCE_ALIGNMENT;
-} once_flag;
-#define ONCE_FLAG_INIT { 0 }
+typedef __once_flag once_flag;
+#define ONCE_FLAG_INIT __ONCE_FLAG_INIT
typedef union
{