How can I list all threads in the current process in FreeBSD? Or at least get the number of threads.
I found a Linux system call pstat_getproc that returns a structure containing pst_nlwps , the number of threads. I am looking for something similar to this on FreeBSD.
Or maybe there is something like /dev/fd , but for threads.
All that I can use to get an idea of how many other threads are working.
I want to be able to do this programmatically in C without using an existing application.
source share