From db94676fbd90b0affb8474a2af4e10718ba3136d Mon Sep 17 00:00:00 2001 From: "Roger A. Faulkner" Date: Tue, 27 Oct 2009 10:50:50 -0700 Subject: 6895172 CR 6762445 was too aggressive; signals are blocked in lwp_mutex_lock() --- usr/src/lib/libc/port/sys/lwp.c | 9 ++------- usr/src/lib/libc/port/sys/lwp_cond.c | 13 ++++--------- 2 files changed, 6 insertions(+), 16 deletions(-) (limited to 'usr/src/lib/libc/port/sys') diff --git a/usr/src/lib/libc/port/sys/lwp.c b/usr/src/lib/libc/port/sys/lwp.c index cd33da8464..46ba41c070 100644 --- a/usr/src/lib/libc/port/sys/lwp.c +++ b/usr/src/lib/libc/port/sys/lwp.c @@ -20,12 +20,10 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "lint.h" #include "thr_uberdata.h" #include @@ -35,15 +33,12 @@ #include #include -extern int ___lwp_mutex_timedlock(mutex_t *, timespec_t *); -extern int ___lwp_sema_timedwait(lwp_sema_t *, timespec_t *, int); - int _lwp_mutex_lock(mutex_t *mp) { if (set_lock_byte(&mp->mutex_lockw) == 0) return (0); - return (___lwp_mutex_timedlock(mp, NULL)); + return (___lwp_mutex_timedlock(mp, NULL, NULL)); } int diff --git a/usr/src/lib/libc/port/sys/lwp_cond.c b/usr/src/lib/libc/port/sys/lwp_cond.c index 9f0c4da3b8..b9bac46381 100644 --- a/usr/src/lib/libc/port/sys/lwp_cond.c +++ b/usr/src/lib/libc/port/sys/lwp_cond.c @@ -20,24 +20,19 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include "lint.h" +#include "thr_uberdata.h" #include - #include #include #include #include #include -extern int ___lwp_cond_wait(lwp_cond_t *, lwp_mutex_t *, timespec_t *, int); -extern int ___lwp_mutex_timedlock(lwp_mutex_t *, timespec_t *); - int _lwp_cond_wait(cond_t *cv, mutex_t *mp) { @@ -45,7 +40,7 @@ _lwp_cond_wait(cond_t *cv, mutex_t *mp) error = ___lwp_cond_wait(cv, mp, NULL, 0); if (mp->mutex_type & (PTHREAD_PRIO_INHERIT|PTHREAD_PRIO_PROTECT)) - (void) ___lwp_mutex_timedlock(mp, NULL); + (void) ___lwp_mutex_timedlock(mp, NULL, NULL); else (void) _lwp_mutex_lock(mp); return (error); @@ -61,7 +56,7 @@ _lwp_cond_reltimedwait(cond_t *cv, mutex_t *mp, timespec_t *relts) return (EINVAL); error = ___lwp_cond_wait(cv, mp, relts, 0); if (mp->mutex_type & (PTHREAD_PRIO_INHERIT|PTHREAD_PRIO_PROTECT)) - (void) ___lwp_mutex_timedlock(mp, NULL); + (void) ___lwp_mutex_timedlock(mp, NULL, NULL); else (void) _lwp_mutex_lock(mp); return (error); -- cgit v1.2.3