pthread: Add lwp_setname(2) and implement pthread_set_name_np(3)
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 19 Nov 2015 03:37:28 +0000 (11:37 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 19 Nov 2015 08:36:29 +0000 (16:36 +0800)
commit0ca59c3431dcb07cc5de00e279c574459aa3bc34
tree39dd3e059441db038838cf1dea583b8f07e006d3
parent591d50430760bd31759dc7f5343a7122560f86ce
pthread: Add lwp_setname(2) and implement pthread_set_name_np(3)

- Return thread name through kinfo.
- Show thread name in ps(1) for 'Hc'.
- Show thread name in top(1), if it is different from process name.
23 files changed:
bin/ps/extern.h
bin/ps/print.c
bin/ps/ps.c
include/unistd.h
lib/libc/sys/Makefile.inc
lib/libc/sys/Symbol.map
lib/libc/sys/lwp_setname.2 [new file with mode: 0644]
lib/libpthread/pthread_set_name_np.3
lib/libthread_xu/thread/thr_info.c
sys/kern/init_sysent.c
sys/kern/kern_kinfo.c
sys/kern/kern_prot.c
sys/kern/syscalls.c
sys/kern/syscalls.master
sys/sys/kinfo.h
sys/sys/param.h
sys/sys/syscall.h
sys/sys/syscall.mk
sys/sys/sysproto.h
sys/sys/sysunion.h
test/pthread/setname/Makefile [new file with mode: 0644]
test/pthread/setname/pthread_setname.c [new file with mode: 0644]
usr.bin/top/m_dragonfly.c