diff options
author | John Levon <john.levon@joyent.com> | 2018-10-08 15:34:11 +0100 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2018-10-19 16:40:54 -0400 |
commit | ab618543cc6fc4bc273c077ef5d247961cdb29d4 (patch) | |
tree | 24c80e35e958a4c5fef77d444eacb1b4f45798a2 /usr/src/cmd/svc/startd/restarter.c | |
parent | 62f63298eba531d48f87aa8c2089298cb7821962 (diff) | |
download | illumos-gate-ab618543cc6fc4bc273c077ef5d247961cdb29d4.tar.gz |
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/cmd/svc/startd/restarter.c')
-rw-r--r-- | usr/src/cmd/svc/startd/restarter.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/usr/src/cmd/svc/startd/restarter.c b/usr/src/cmd/svc/startd/restarter.c index 676cded1c8..a98c863fb5 100644 --- a/usr/src/cmd/svc/startd/restarter.c +++ b/usr/src/cmd/svc/startd/restarter.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright 2018 Joyent, Inc. */ /* @@ -994,6 +994,8 @@ restarter_post_fsminimal_thread(void *unused) scf_handle_t *h; int r; + (void) pthread_setname_np(pthread_self(), "restarter_post_fsmin"); + h = libscf_handle_create_bound_loop(); for (;;) { @@ -1771,6 +1773,8 @@ restarter_process_events(void *arg) char *fmri = (char *)arg; struct timespec to; + (void) pthread_setname_np(pthread_self(), "restarter_process_events"); + assert(fmri != NULL); h = libscf_handle_create_bound_loop(); @@ -1939,8 +1943,8 @@ out: } static int -is_admin_event(restarter_event_type_t t) { - +is_admin_event(restarter_event_type_t t) +{ switch (t) { case RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON: case RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON_IMMEDIATE: @@ -1985,6 +1989,8 @@ restarter_event_thread(void *unused) { scf_handle_t *h; + (void) pthread_setname_np(pthread_self(), "restarter_event"); + /* * This is a new thread, and thus, gets its own handle * to the repository. @@ -2196,6 +2202,8 @@ restarter_contracts_event_thread(void *unused) int fd, err; scf_handle_t *local_handle; + (void) pthread_setname_np(pthread_self(), "restarter_contracts_event"); + /* * Await graph load completion. That is, stop here, until we've scanned * the repository for contract - instance associations. @@ -2545,6 +2553,8 @@ restarter_timeouts_event_thread(void *unused) * is not empty. */ + (void) pthread_setname_np(pthread_self(), "restarter_timeouts_event"); + /*CONSTCOND*/ while (1) { /* |