diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/disp/fss.c | 11 | ||||
-rw-r--r-- | usr/src/uts/common/disp/fx.c | 11 | ||||
-rw-r--r-- | usr/src/uts/common/disp/ts.c | 11 |
3 files changed, 21 insertions, 12 deletions
diff --git a/usr/src/uts/common/disp/fss.c b/usr/src/uts/common/disp/fss.c index b051974669..62301d65d8 100644 --- a/usr/src/uts/common/disp/fss.c +++ b/usr/src/uts/common/disp/fss.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -1615,13 +1614,12 @@ fss_forkret(kthread_t *t, kthread_t *ct) * process does not disappear before we set it running. */ mutex_enter(&cp->p_lock); - mutex_exit(&pidlock); continuelwps(cp); mutex_exit(&cp->p_lock); mutex_enter(&pp->p_lock); + mutex_exit(&pidlock); continuelwps(pp); - mutex_exit(&pp->p_lock); thread_lock(t); @@ -1645,6 +1643,11 @@ fss_forkret(kthread_t *t, kthread_t *ct) setfrontdq(t); thread_unlock(t); + /* + * Safe to drop p_lock now since it is safe to change + * the scheduling class after this point. + */ + mutex_exit(&pp->p_lock); swtch(); } diff --git a/usr/src/uts/common/disp/fx.c b/usr/src/uts/common/disp/fx.c index dd6295074c..7e3607526b 100644 --- a/usr/src/uts/common/disp/fx.c +++ b/usr/src/uts/common/disp/fx.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/types.h> @@ -658,13 +657,12 @@ fx_forkret(kthread_t *t, kthread_t *ct) * the process does not disappear before we set it running. */ mutex_enter(&cp->p_lock); - mutex_exit(&pidlock); continuelwps(cp); mutex_exit(&cp->p_lock); mutex_enter(&pp->p_lock); + mutex_exit(&pidlock); continuelwps(pp); - mutex_exit(&pp->p_lock); thread_lock(t); fxpp = (fxproc_t *)(t->t_cldata); @@ -673,6 +671,11 @@ fx_forkret(kthread_t *t, kthread_t *ct) THREAD_TRANSITION(t); fx_setrun(t); thread_unlock(t); + /* + * Safe to drop p_lock now since it is safe to change + * the scheduling class after this point. + */ + mutex_exit(&pp->p_lock); swtch(); } diff --git a/usr/src/uts/common/disp/ts.c b/usr/src/uts/common/disp/ts.c index e8d1565276..05605be7f0 100644 --- a/usr/src/uts/common/disp/ts.c +++ b/usr/src/uts/common/disp/ts.c @@ -20,8 +20,7 @@ */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ @@ -739,13 +738,12 @@ ts_forkret(kthread_t *t, kthread_t *ct) * the process does not disappear before we set it running. */ mutex_enter(&cp->p_lock); - mutex_exit(&pidlock); continuelwps(cp); mutex_exit(&cp->p_lock); mutex_enter(&pp->p_lock); + mutex_exit(&pidlock); continuelwps(pp); - mutex_exit(&pp->p_lock); thread_lock(t); tspp = (tsproc_t *)(t->t_cldata); @@ -759,6 +757,11 @@ ts_forkret(kthread_t *t, kthread_t *ct) THREAD_TRANSITION(t); ts_setrun(t); thread_unlock(t); + /* + * Safe to drop p_lock now since since it is safe to change + * the scheduling class after this point. + */ + mutex_exit(&pp->p_lock); swtch(); } |