From a67e1e347544393a4828fa21d5cf6f670590fd76 Mon Sep 17 00:00:00 2001 From: ad Date: Sun, 10 Feb 2008 18:50:54 +0000 Subject: - Remove libpthread's atomic ops. - Remove the old spinlock-based mutex and rwlock implementations. - Use the atomic ops from libc. --- lib/libpthread/pthread_misc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/libpthread/pthread_misc.c') 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 -__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 #include @@ -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; } -- cgit