diff options
author | Yuri Pankov <yuri.pankov@nexenta.com> | 2016-09-05 18:48:42 +0300 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2016-09-06 11:24:03 -0700 |
commit | 0756cc7034e080027082817163d21e36e93310ed (patch) | |
tree | 3929d1fc3276065e836462c904f50bd04aca07ba | |
parent | ccd5347f5bded380cdbfc73f87db15cfd5610961 (diff) | |
download | illumos-joyent-0756cc7034e080027082817163d21e36e93310ed.tar.gz |
5304 syseventd: datalink notify thread hangs up when terminated
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r-- | usr/src/cmd/syseventd/modules/datalink_mod/datalink_mod.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/src/cmd/syseventd/modules/datalink_mod/datalink_mod.c b/usr/src/cmd/syseventd/modules/datalink_mod/datalink_mod.c index 72b8a5b7ce..3982a5b583 100644 --- a/usr/src/cmd/syseventd/modules/datalink_mod/datalink_mod.c +++ b/usr/src/cmd/syseventd/modules/datalink_mod/datalink_mod.c @@ -18,9 +18,11 @@ * * CDDL HEADER END */ + /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2016 Nexenta Systems, Inc. */ /* @@ -164,15 +166,17 @@ slm_init() if (rcm_alloc_handle(NULL, 0, NULL, &rcm_hdl) != RCM_SUCCESS) return (NULL); + (void) mutex_init(&dl_mx, USYNC_THREAD, NULL); + (void) cond_init(&dl_cv, USYNC_THREAD, NULL); + if (thr_create(NULL, 0, datalink_notify_thread, NULL, 0, &dl_notify_tid) != 0) { (void) rcm_free_handle(rcm_hdl); + (void) mutex_destroy(&dl_mx); + (void) cond_destroy(&dl_cv); return (NULL); } - (void) mutex_init(&dl_mx, USYNC_THREAD, NULL); - (void) cond_init(&dl_cv, USYNC_THREAD, NULL); - return (&datalink_mod_ops); } |