diff options
author | rab <none@none> | 2006-01-06 10:19:31 -0800 |
---|---|---|
committer | rab <none@none> | 2006-01-06 10:19:31 -0800 |
commit | 0baeff3d96eae184e775c1064f1836090446a7bf (patch) | |
tree | 223a82fa3266e75588aace66980f22165d83fcff /usr/src/uts/common/os/lwp.c | |
parent | d045b9872121ef87817d5d01968d80cc01574bc8 (diff) | |
download | illumos-joyent-0baeff3d96eae184e775c1064f1836090446a7bf.tar.gz |
6219276 need per-process equivalent of device context
6244042 x86 kernels do not need default LDTs
6308413 sysi86(SI86DSCR) rejects the first valid custom descriptor #6 with errno
6308413 contributed by Juergen Keil <jk@tools.de>
Diffstat (limited to 'usr/src/uts/common/os/lwp.c')
-rw-r--r-- | usr/src/uts/common/os/lwp.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/usr/src/uts/common/os/lwp.c b/usr/src/uts/common/os/lwp.c index df3f6767e8..dbccf77b9e 100644 --- a/usr/src/uts/common/os/lwp.c +++ b/usr/src/uts/common/os/lwp.c @@ -21,7 +21,7 @@ */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -785,6 +785,12 @@ lwp_exit(void) * death-row by resume(). Avoid preemption after resetting t->t_procp. */ t->t_preempt++; + + if (t->t_ctx != NULL) + exitctx(t); + if (p->p_pctx != NULL) + exitpctx(p); + t->t_procp = &p0; /* @@ -817,9 +823,6 @@ lwp_exit(void) lwp_pcb_exit(); - if (t->t_ctx != NULL) - exitctx(t); - t->t_state = TS_ZOMB; swtch_from_zombie(); /* never returns */ @@ -1617,12 +1620,7 @@ forklwp(klwp_t *lwp, proc_t *cp, id_t lwpid) lwp_forkregs(lwp, clwp); /* - * fork device context, if any. - * - * Someday we could do the work to support the possibility of - * forkctx() or lwp_createctx() failing. Currently, this would - * only be needed on x86 for the occasional process using a - * private LDT. + * Fork thread context ops, if any. */ if (t->t_ctx) forkctx(t, ct); |