How can I list all threads within the current process in FreeBSD? Or at least, get the number of threads running.
I found the Linux system call pstat_getproc
which returns a struct containing pst_nlwps
, the number of threads. I am looking for something similar to this on FreeBSD.
Or perhaps there is something like /dev/fd
but for threads.
Anything I can use to get some kind of idea about how many other threads are running.
I want to be able to do this programmatically in C, not using an existing application.