diff options
| author | ad <ad@NetBSD.org> | 2008-02-10 18:50:54 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2008-02-10 18:50:54 +0000 |
| commit | a67e1e347544393a4828fa21d5cf6f670590fd76 (patch) | |
| tree | c200cca9ccceecd65fe50f0b925bb5ad7831fa14 /lib/libpthread/pthread_misc.c | |
| parent | 749400b7044c2a3ca87455ac26cc1184b678a353 (diff) | |
- Remove libpthread's atomic ops.
- Remove the old spinlock-based mutex and rwlock implementations.
- Use the atomic ops from libc.
Diffstat (limited to 'lib/libpthread/pthread_misc.c')
| -rw-r--r-- | lib/libpthread/pthread_misc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libpthread/pthread_misc.c b/lib/libpthread/pthread_misc.c index 4a5b3930f10..198225ec0f3 100644 --- a/lib/libpthread/pthread_misc.c +++ b/lib/libpthread/pthread_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_misc.c,v 1.6 2008/02/09 17:07:54 yamt Exp $ */ +/* $NetBSD: pthread_misc.c,v 1.7 2008/02/10 18:50:54 ad Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: pthread_misc.c,v 1.6 2008/02/09 17:07:54 yamt Exp $"); +__RCSID("$NetBSD: pthread_misc.c,v 1.7 2008/02/10 18:50:54 ad Exp $"); #include <errno.h> #include <string.h> @@ -173,13 +173,12 @@ pthread__sched_yield(void) self = pthread__self(); -#ifdef PTHREAD__HAVE_ATOMIC /* Memory barrier for unlocked mutex release. */ - pthread__membar_producer(); -#endif + membar_producer(); self->pt_blocking++; error = _sys_sched_yield(); self->pt_blocking--; + membar_sync(); return error; } |
