diff options
author | 2013-06-03 04:33:44 +0000 | |
---|---|---|
committer | 2013-06-03 04:33:44 +0000 | |
commit | f3d519f9573b06bf671c1209f59e18bb236d3e7b (patch) | |
tree | 48730a24edd441a9cbdf1f202e07e812a6e374ad /lib/librthread | |
parent | -I to confirm pkills. ok many (diff) | |
download | wireguard-openbsd-f3d519f9573b06bf671c1209f59e18bb236d3e7b.tar.xz wireguard-openbsd-f3d519f9573b06bf671c1209f59e18bb236d3e7b.zip |
THE MACHINE DEPENDENT CERROR CODE HAS HARD CODED OFFSETS INTO PTHREAD_T!
found the hard way by miod. resize and realign all the locks and
semaphores back to the way they were. sometimes i just can't win.
Diffstat (limited to 'lib/librthread')
-rw-r--r-- | lib/librthread/rthread.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/librthread/rthread.h b/lib/librthread/rthread.h index e10d2576054..2cb1925cccc 100644 --- a/lib/librthread/rthread.h +++ b/lib/librthread/rthread.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread.h,v 1.43 2013/06/01 23:06:26 tedu Exp $ */ +/* $OpenBSD: rthread.h,v 1.44 2013/06/03 04:33:44 tedu Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -23,6 +23,8 @@ * Do not reorder struct _spinlock and sem_t variables in the structs. * This is due to alignment requirements of certain arches like hppa. * The current requirement is 16 bytes. + * + * THE MACHINE DEPENDENT CERROR CODE HAS HARD CODED OFFSETS INTO PTHREAD_T! */ #include <sys/queue.h> @@ -44,12 +46,9 @@ */ struct _spinlock { _atomic_lock_t ticket; - uint32_t __waiter; - uint32_t __ready; - int __pad; }; -#define _SPINLOCK_UNLOCKED { _ATOMIC_LOCK_UNLOCKED, 0, 0 } +#define _SPINLOCK_UNLOCKED { _ATOMIC_LOCK_UNLOCKED } extern struct _spinlock _SPINLOCK_UNLOCKED_ASSIGN; struct stack { @@ -65,6 +64,7 @@ struct __sem { struct _spinlock lock; volatile int waitcount; volatile int value; + int __pad; }; TAILQ_HEAD(pthread_queue, pthread); @@ -156,12 +156,12 @@ struct pthread_spinlock { struct pthread { struct __sem donesem; - pid_t tid; - unsigned int flags; - struct _spinlock flags_lock; #if TLS_VARIANT == 1 int *errno_ptr; #endif + pid_t tid; + unsigned int flags; + struct _spinlock flags_lock; void *retval; void *(*fn)(void *); void *arg; |