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

@@ -22,12 +22,12 @@
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 /*
  * Copyright 2012 DEY Storage Systems, Inc.  All rights reserved.
- * Copyright (c) 2014, Joyent, Inc. All rights reserved.
  * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright 2018 Joyent, Inc.
  */
 
 #ifndef _PCONTROL_H
 #define _PCONTROL_H
 

@@ -43,10 +43,11 @@
 #include <rtld_db.h>
 #include <libproc.h>
 #include <libctf.h>
 #include <limits.h>
 #include <libproc.h>
+#include <thread.h>
 #include <sys/secflags.h>
 
 #ifdef  __cplusplus
 extern "C" {
 #endif

@@ -134,10 +135,11 @@
 typedef struct lwp_info {       /* per-lwp information from core file */
         plist_t lwp_list;       /* linked list */
         lwpid_t lwp_id;         /* lwp identifier */
         lwpsinfo_t lwp_psinfo;  /* /proc/<pid>/lwp/<lwpid>/lwpsinfo data */
         lwpstatus_t lwp_status; /* /proc/<pid>/lwp/<lwpid>/lwpstatus data */
+        char lwp_name[THREAD_NAME_MAX];
 #if defined(sparc) || defined(__sparc)
         gwindows_t *lwp_gwins;  /* /proc/<pid>/lwp/<lwpid>/gwindows data */
         prxregset_t *lwp_xregs; /* /proc/<pid>/lwp/<lwpid>/xregs data */
         int64_t *lwp_asrs;      /* /proc/<pid>/lwp/<lwpid>/asrs data */
 #endif