summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2017-11-28 18:57:02 +0000
committerkettenis <kettenis@openbsd.org>2017-11-28 18:57:02 +0000
commit53213268fe8ce4b2e07ec0fc860162ba75f7cced (patch)
treea6674cd11c590766ef7f6a62063bce0956d4281e /include
parentOne less lie in comments (diff)
downloadwireguard-openbsd-53213268fe8ce4b2e07ec0fc860162ba75f7cced.tar.xz
wireguard-openbsd-53213268fe8ce4b2e07ec0fc860162ba75f7cced.zip
Add a member to be used by __cxa_thread_atexit(). Remove padding which would
now misalign things. ok guenther@
Diffstat (limited to 'include')
-rw-r--r--include/tib.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/tib.h b/include/tib.h
index ce170be3c7a..1c610222df6 100644
--- a/include/tib.h
+++ b/include/tib.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tib.h,v 1.5 2017/08/10 13:35:18 guenther Exp $ */
+/* $OpenBSD: tib.h,v 1.6 2017/11/28 18:57:02 kettenis Exp $ */
/*
* Copyright (c) 2011,2014 Philip Guenther <guenther@openbsd.org>
*
@@ -135,6 +135,7 @@
*/
struct tib {
+ void *tib_atexit;
int tib_thread_flags; /* internal to libpthread */
pid_t tib_tid;
int tib_cantcancel;
@@ -182,16 +183,12 @@ struct tib {
int tib_cantcancel;
pid_t tib_tid;
int tib_thread_flags; /* internal to libpthread */
-#if !defined(__LP64__) && !defined(__i386)
- int __tib_padding; /* padding for 8byte alignment */
-#endif
+ void *tib_atexit;
};
#if defined(__i386) || defined(__amd64)
# define _TIB_PREP(tib) \
((void)((tib)->__tib_self = (tib)))
-#elif !defined(__LP64__) && !defined(__i386)
-# define _TIB_PREP(tib) ((void)((tib)->__tib_padding = 0))
#endif
#define TIB_EXTRA_ALIGN sizeof(void *)
@@ -207,6 +204,7 @@ struct tib {
#define TIB_INIT(tib, dtv, thread) do { \
(tib)->tib_thread = (thread); \
+ (tib)->tib_atexit = NULL; \
(tib)->tib_locale = NULL; \
(tib)->tib_cantcancel = 0; \
(tib)->tib_cancel_point = 0; \