summaryrefslogtreecommitdiff
path: root/usr/src/cmd/svc
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/svc')
-rw-r--r--usr/src/cmd/svc/startd/graph.c14
-rw-r--r--usr/src/cmd/svc/startd/method.c4
-rw-r--r--usr/src/cmd/svc/startd/restarter.c16
-rw-r--r--usr/src/cmd/svc/startd/wait.c5
4 files changed, 7 insertions, 32 deletions
diff --git a/usr/src/cmd/svc/startd/graph.c b/usr/src/cmd/svc/startd/graph.c
index 6b617690c1..30881ea34a 100644
--- a/usr/src/cmd/svc/startd/graph.c
+++ b/usr/src/cmd/svc/startd/graph.c
@@ -21,10 +21,10 @@
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2013, Joyent, Inc. All rights reserved.
* Copyright (c) 2015, Syneto S.R.L. All rights reserved.
* Copyright 2016 Toomas Soome <tsoome@me.com>
* Copyright 2016 RackTop Systems.
- * Copyright 2018 Joyent, Inc.
*/
/*
@@ -579,7 +579,7 @@ typedef enum {
typedef int (*graph_walk_cb_t)(graph_vertex_t *, void *);
typedef struct graph_walk_info {
- graph_walk_dir_t gi_dir;
+ graph_walk_dir_t gi_dir;
uchar_t *gi_visited; /* vertex bitmap */
int (*gi_pre)(graph_vertex_t *, void *);
void (*gi_post)(graph_vertex_t *, void *);
@@ -3852,8 +3852,6 @@ run_sulogin(const char *msg)
static void *
sulogin_thread(void *unused)
{
- (void) pthread_setname_np(pthread_self(), "sulogin");
-
MUTEX_LOCK(&dgraph_lock);
assert(sulogin_thread_running);
@@ -3881,8 +3879,6 @@ single_user_thread(void *unused)
char *buf;
int r;
- (void) pthread_setname_np(pthread_self(), "single_user");
-
MUTEX_LOCK(&single_user_thread_lock);
single_user_thread_count++;
@@ -5800,8 +5796,6 @@ graph_event_thread(void *unused)
scf_handle_t *h;
int err;
- (void) pthread_setname_np(pthread_self(), "graph_event");
-
h = libscf_handle_create_bound_loop();
/*CONSTCOND*/
@@ -6161,8 +6155,6 @@ graph_thread(void *arg)
scf_handle_t *h;
int err;
- (void) pthread_setname_np(pthread_self(), "graph");
-
h = libscf_handle_create_bound_loop();
if (st->st_initial)
@@ -6820,8 +6812,6 @@ repository_event_thread(void *unused)
int r;
int fd;
- (void) pthread_setname_np(pthread_self(), "repository_event");
-
h = libscf_handle_create_bound_loop();
pg = safe_scf_pg_create(h);
diff --git a/usr/src/cmd/svc/startd/method.c b/usr/src/cmd/svc/startd/method.c
index 1d8ffaa2b6..c3cd0144c1 100644
--- a/usr/src/cmd/svc/startd/method.c
+++ b/usr/src/cmd/svc/startd/method.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2012 Joyent, Inc. All rights reserved.
*/
/*
@@ -1135,8 +1135,6 @@ method_thread(void *arg)
boolean_t retryable;
restarter_str_t reason;
- (void) pthread_setname_np(pthread_self(), "method");
-
assert(0 <= info->sf_method_type && info->sf_method_type <= 2);
/* Get (and lock) the restarter_inst_t. */
diff --git a/usr/src/cmd/svc/startd/restarter.c b/usr/src/cmd/svc/startd/restarter.c
index a98c863fb5..676cded1c8 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 2018 Joyent, Inc.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
*/
/*
@@ -994,8 +994,6 @@ 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 (;;) {
@@ -1773,8 +1771,6 @@ 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();
@@ -1943,8 +1939,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:
@@ -1989,8 +1985,6 @@ 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.
@@ -2202,8 +2196,6 @@ 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.
@@ -2553,8 +2545,6 @@ restarter_timeouts_event_thread(void *unused)
* is not empty.
*/
- (void) pthread_setname_np(pthread_self(), "restarter_timeouts_event");
-
/*CONSTCOND*/
while (1) {
/*
diff --git a/usr/src/cmd/svc/startd/wait.c b/usr/src/cmd/svc/startd/wait.c
index 12856ff639..ebd83be10e 100644
--- a/usr/src/cmd/svc/startd/wait.c
+++ b/usr/src/cmd/svc/startd/wait.c
@@ -21,8 +21,7 @@
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
- *
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2012, Joyent, Inc. All rights reserved.
*/
/*
@@ -253,8 +252,6 @@ wait_register(pid_t pid, const char *inst_fmri, int am_parent, int direct)
void *
wait_thread(void *args)
{
- (void) pthread_setname_np(pthread_self(), "wait");
-
for (;;) {
port_event_t pe;
int fd;