Import definitions of `pthread_d` and `pthread_addr_t`
from musl, with minor changes to adapt for nolibc's
`sharedefs.h`.
Source of import:
Repository: https://git.musl-libc.org/cgit/musl
Tag: v1.2.4 (
f5f55d65)
Path: musl/include/alltypes.h.in
Checkpatch-Ignore: POINTER_LOCATION
Checkpatch-Ignore: LONG_LINES
Checkpatch-Ignore: VOLATILE
Checkpatch-Ignore: SPACING
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1244
typedef unsigned long u_long;
#define __DEFINED_BSD_TYPES
#endif
+
+#if (defined __NEED_pthread_t && !defined __DEFINED_pthread_t)
+#ifdef __cplusplus
+typedef unsigned long pthread_t;
+#else
+typedef struct __pthread * pthread_t;
+#endif
+#define __DEFINED_pthread_t
+#endif
+
+#if (defined __NEED_pthread_attr_t && !defined __DEFINED_pthread_attr_t)
+typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
+#define __DEFINED_pthread_attr_t
+#endif