summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2017-08-01 08:57:48 +0000
committerkettenis <kettenis@openbsd.org>2017-08-01 08:57:48 +0000
commitd076432b6ad4fcb109439f9e5c9441425fd53143 (patch)
tree3a31caa2fcfd61de2219d4b95fcf5b8d0f9523a8 /lib
parentcorrect function name; (diff)
downloadwireguard-openbsd-d076432b6ad4fcb109439f9e5c9441425fd53143.tar.xz
wireguard-openbsd-d076432b6ad4fcb109439f9e5c9441425fd53143.zip
Use "volatile unsigned int" instead of _atomic_lock_t. The _atomic_lock_t
isn't the same size on all our architectures and should only be used for spin locks. ok visa@, mpi@
Diffstat (limited to 'lib')
-rw-r--r--lib/librthread/rthread.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/librthread/rthread.h b/lib/librthread/rthread.h
index 92ccf459a33..cf041aacbe1 100644
--- a/lib/librthread/rthread.h
+++ b/lib/librthread/rthread.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread.h,v 1.61 2017/05/27 14:20:39 mpi Exp $ */
+/* $OpenBSD: rthread.h,v 1.62 2017/08/01 08:57:48 kettenis Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -60,7 +60,7 @@ TAILQ_HEAD(pthread_queue, pthread);
#ifdef FUTEX
struct pthread_mutex {
- _atomic_lock_t lock;
+ volatile unsigned int lock;
int type;
pthread_t owner;
int count;
@@ -68,7 +68,7 @@ struct pthread_mutex {
};
struct pthread_cond {
- _atomic_lock_t seq;
+ volatile unsigned int seq;
clockid_t clock;
struct pthread_mutex *mutex;
};