diff options
author | Patrick Mooney <pmooney@pfmooney.com> | 2015-11-06 19:01:13 +0000 |
---|---|---|
committer | Patrick Mooney <pmooney@pfmooney.com> | 2015-11-11 21:10:07 +0000 |
commit | cd134fbefbadf1e3e1923a18a345d4813f39fea3 (patch) | |
tree | fc8caf3d4f47ee288365b9fe7af1e2150f44cb2f /usr/src/uts/common/os/lwp.c | |
parent | d02acd3660b1cdab6856f3f37304f21788ecb5a0 (diff) | |
download | illumos-joyent-release-20151112.tar.gz |
OS-4937 lxbrand ptracer count updates can racerelease-20151112
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
Diffstat (limited to 'usr/src/uts/common/os/lwp.c')
-rw-r--r-- | usr/src/uts/common/os/lwp.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr/src/uts/common/os/lwp.c b/usr/src/uts/common/os/lwp.c index 1775e22b0d..3aaf2c746c 100644 --- a/usr/src/uts/common/os/lwp.c +++ b/usr/src/uts/common/os/lwp.c @@ -697,7 +697,14 @@ grow: t->t_pre_sys = 1; t->t_post_sys = 1; - /* Complete branded lwp initialization */ + /* + * Perform lwp branding + * + * The b_initlwp hook is _not_ allowed to drop p->p_lock as it must be + * continuously held between when the tidhash is sized and when the lwp + * is inserted into it. Operations requiring p->p_lock to be + * temporarily dropped can be performed in b_initlwp_post. + */ if (PROC_IS_BRANDED(p)) { BROP(p)->b_initlwp(lwp, brand_data); /* @@ -732,6 +739,13 @@ grow: lep->le_start = t->t_start; lwp_hash_in(p, lep, p->p_tidhash, p->p_tidhash_sz, 1); + /* + * Complete lwp branding + */ + if (PROC_IS_BRANDED(p) && BROP(p)->b_initlwp_post != NULL) { + BROP(p)->b_initlwp_post(lwp); + } + if (state == TS_RUN) { /* * We set the new lwp running immediately. |