int proc_threads_max(void);
no arguments
The maximum number of threads to be used by the kernel, with a default value of 4095.
On success, returns the thread max value. On error, -1 is returned.