Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section

*** 19,28 **** --- 19,29 ---- * CDDL HEADER END */ /* * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2018 Joyent, Inc. * Copyright (c) 2015, Syneto S.R.L. All rights reserved. * Copyright 2016 Toomas Soome <tsoome@me.com> * Copyright 2016 RackTop Systems. */
*** 3847,3856 **** --- 3848,3859 ---- */ /* ARGSUSED */ static void * sulogin_thread(void *unused) { + (void) pthread_setname_np(pthread_self(), "sulogin"); + MUTEX_LOCK(&dgraph_lock); assert(sulogin_thread_running); do {
*** 3874,3883 **** --- 3877,3888 ---- scf_value_t *val; const char *msg; char *buf; int r; + (void) pthread_setname_np(pthread_self(), "single_user"); + MUTEX_LOCK(&single_user_thread_lock); single_user_thread_count++; if (!booting_to_single_user) kill_user_procs();
*** 5777,5786 **** --- 5782,5793 ---- 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*/ while (1) { graph_protocol_event_t *e;
*** 6136,6145 **** --- 6143,6154 ---- 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) set_initial_milestone(h);
*** 6792,6801 **** --- 6801,6812 ---- scf_instance_t *inst; char *fmri = startd_alloc(max_scf_fmri_size); char *pg_name = startd_alloc(max_scf_value_size); int r; + (void) pthread_setname_np(pthread_self(), "repository_event"); + h = libscf_handle_create_bound_loop(); pg = safe_scf_pg_create(h); inst = safe_scf_instance_create(h);