summaryrefslogtreecommitdiff
path: root/lib/libpthread/pthread_spin.c
diff options
context:
space:
mode:
authormatt <matt@NetBSD.org>2012-08-16 04:49:47 +0000
committermatt <matt@NetBSD.org>2012-08-16 04:49:47 +0000
commit6a3069e1c50fa610f804db3be271aa4ae210b024 (patch)
tree4fa288126e23a6b3717c3badfef8f9e5d11c61c4 /lib/libpthread/pthread_spin.c
parentf54a3f5e69cc66993e101f08febc3fd40e22324d (diff)
Add a pthread__smt_wake and add support for it on arm along with
pthread__smt_pause. These are implemented using the ARM instructions SEV (wake) and WFE (pause). These are treated as NOPs on ARM CPUs that don't support them.
Diffstat (limited to 'lib/libpthread/pthread_spin.c')
-rw-r--r--lib/libpthread/pthread_spin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/pthread_spin.c b/lib/libpthread/pthread_spin.c
index 910a94548b4..01738d73c5b 100644
--- a/lib/libpthread/pthread_spin.c
+++ b/lib/libpthread/pthread_spin.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_spin.c,v 1.5 2008/04/28 20:23:01 martin Exp $ */
+/* $NetBSD: pthread_spin.c,v 1.6 2012/08/16 04:49:47 matt Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_spin.c,v 1.5 2008/04/28 20:23:01 martin Exp $");
+__RCSID("$NetBSD: pthread_spin.c,v 1.6 2012/08/16 04:49:47 matt Exp $");
#include <sys/types.h>
#include <sys/ras.h>
@@ -133,6 +133,7 @@ pthread_spin_unlock(pthread_spinlock_t *lock)
self = pthread__self();
pthread__spinunlock(self, &lock->pts_spin);
+ pthread__smt_wake();
return 0;
}