diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-12-29 18:10:12 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-12-29 18:10:12 +0000 |
commit | 8586c29a431b5f357dee84dd2e7541695501d9df (patch) | |
tree | 6fffc554e95925081d4214e620a0e02d3b19245e /usr/src/lib/libdiskmgt/common/events.c | |
parent | 07cabe1a94078bca24f73eab3fc7ca1e854cf401 (diff) | |
parent | 7f7cea96d5057c067c283bdd0a3bd608876b3d90 (diff) | |
download | illumos-joyent-8586c29a431b5f357dee84dd2e7541695501d9df.tar.gz |
[illumos-gate merge]
commit 7f7cea96d5057c067c283bdd0a3bd608876b3d90
12126 truss: passing argument 1 to restrict-qualified parameter aliases with argument 4
commit f772f0f818f73daf7235ea98001eb45736057eb4
12121 prtconf: cast between incompatible function types
commit d9a262d9c411812b053dc33b7b8ab0f230c6fb00
12123 sendmail: cast between incompatible function types
commit 698f4ab6008be205f4362675967638572eef4f21
12128 error: this statement may fall through
commit d6beba26494f4877120c99b5931876f56ba5dee5
12127 auditd: cast between incompatible function types
commit 0e540600911704593d2db2a54688b06c90621822
12122 rcm_daemon: cast between incompatible function types
commit 45057a1a493b60c956248b11e538feed43fdc7b6
12120 power: cast between incompatible function types
commit 37395faa43a95e030f79ca75d81f5e4fdfcd2b19
12117 nscd: cast between incompatible function types
commit 491605205e9a54b9266d0b87e470e2dc83ca0d57
12116 idmapd: cast between incompatible function types
commit 13539f0d8047e0522b1de032e340086de35f224e
12113 mailx: cast between incompatible function types
commit 5b784b07fc13e535c4af29e1804b0c6fa58889bf
12111 syseventd: cast between incompatible function types
commit 1146e6b36a51a32283a4cfc8530fd73b88b79a78
12110 audio: control reaches end of non-void function
commit 6af7a37b52615421dd8d8af372794c3399825b45
12108 libfakekernel: passing argument 4 to restrict-qualified parameter aliases with argument 3
commit 6aa760d176ff3ceaed1f2c3f6c2b45352b83e336
12107 libdiskmgt: cast between incompatible function types
commit 2f0b63d22a9a05291df8f83619060f9805eb7581
12104 libkdb_ldap: bitwise comparison always evaluates to false
commit ef2333d135d7eeabe888ac20be8a501a394db591
12102 print: cast between incompatible function types
commit cc98049dd80db1f6cbe13cbd4845c7a4f0e0c863
12101 libsldap: cast between incompatible function types
Diffstat (limited to 'usr/src/lib/libdiskmgt/common/events.c')
-rw-r--r-- | usr/src/lib/libdiskmgt/common/events.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/usr/src/lib/libdiskmgt/common/events.c b/usr/src/lib/libdiskmgt/common/events.c index 6874000bea..f401871e0a 100644 --- a/usr/src/lib/libdiskmgt/common/events.c +++ b/usr/src/lib/libdiskmgt/common/events.c @@ -89,11 +89,11 @@ static int events_pending = 0; static int sendevents = 0; static void add_event_to_queue(nvlist_t *event); -static void cb_watch_events(); +static void *cb_watch_events(void *); static void event_handler(sysevent_t *ev); static void print_nvlist(char *prefix, nvlist_t *list); -static void walk_devtree(); -static void walker(void *arg); +static void walk_devtree(void); +static void *walker(void *arg); static void(*callback)(nvlist_t *, int) = NULL; @@ -184,9 +184,8 @@ dm_init_event_queue(void (*cb)(nvlist_t *, int), int *errp) /* installing a cb; we didn't have one before */ thread_t watch_thread; - *errp = thr_create(NULL, 0, - (void *(*)(void *))cb_watch_events, NULL, THR_DAEMON, - &watch_thread); + *errp = thr_create(NULL, 0, cb_watch_events, NULL, + THR_DAEMON, &watch_thread); } } @@ -204,8 +203,7 @@ dm_init_event_queue(void (*cb)(nvlist_t *, int), int *errp) callback = cb; - *errp = thr_create(NULL, 0, - (void *(*)(void *))cb_watch_events, NULL, THR_DAEMON, + *errp = thr_create(NULL, 0, cb_watch_events, NULL, THR_DAEMON, &watch_thread); } } @@ -344,8 +342,8 @@ add_event_to_queue(nvlist_t *event) (void) sema_post(&semaphore); } -static void -cb_watch_events() +static void * +cb_watch_events(void *arg __unused) { nvlist_t *event; int error; @@ -355,7 +353,7 @@ cb_watch_events() event = dm_get_event(&error); if (callback == NULL) { /* end the thread */ - return; + return (NULL); } callback(event, error); } @@ -474,7 +472,7 @@ print_nvlist(char *prefix, nvlist_t *list) * drive. */ static void -walk_devtree() +walk_devtree(void) { thread_t walk_thread; @@ -482,7 +480,7 @@ walk_devtree() switch (walker_state) { case WALK_NONE: - if (thr_create(NULL, 0, (void *(*)(void *))walker, NULL, + if (thr_create(NULL, 0, walker, NULL, THR_DAEMON, &walk_thread) == 0) { walker_state = WALK_WAITING; } @@ -500,9 +498,8 @@ walk_devtree() mutex_exit(&walker_lock); } -/*ARGSUSED*/ -static void -walker(void *arg) +static void * +walker(void *arg __unused) { int walk_again = 0; @@ -515,7 +512,7 @@ walker(void *arg) walker_state = WALK_NONE; (void) cond_broadcast(&walker_cv); mutex_exit(&walker_lock); - return; + return (NULL); } walker_state = WALK_RUNNING; mutex_exit(&walker_lock); @@ -527,7 +524,7 @@ walker(void *arg) walker_state = WALK_NONE; (void) cond_broadcast(&walker_cv); mutex_exit(&walker_lock); - return; + return (NULL); } if (events_pending) { @@ -542,4 +539,5 @@ walker(void *arg) mutex_exit(&walker_lock); } while (walk_again); + return (NULL); } |