summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/port/sys
diff options
context:
space:
mode:
authorRoger A. Faulkner <Roger.Faulkner@Sun.COM>2009-10-27 10:50:50 -0700
committerRoger A. Faulkner <Roger.Faulkner@Sun.COM>2009-10-27 10:50:50 -0700
commitdb94676fbd90b0affb8474a2af4e10718ba3136d (patch)
treeb170ed9a06fd52199be2e3131a45f55aba80100a /usr/src/lib/libc/port/sys
parentb6ee1ffc437dfc218c4fe37ab7c30ffb523e04cd (diff)
downloadillumos-gate-db94676fbd90b0affb8474a2af4e10718ba3136d.tar.gz
6895172 CR 6762445 was too aggressive; signals are blocked in lwp_mutex_lock()
Diffstat (limited to 'usr/src/lib/libc/port/sys')
-rw-r--r--usr/src/lib/libc/port/sys/lwp.c9
-rw-r--r--usr/src/lib/libc/port/sys/lwp_cond.c13
2 files changed, 6 insertions, 16 deletions
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 <sys/types.h>
@@ -35,15 +33,12 @@
#include <sys/synch32.h>
#include <sys/lwp.h>
-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 <sys/types.h>
-
#include <time.h>
#include <errno.h>
#include <synch.h>
#include <sys/synch32.h>
#include <pthread.h>
-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);