use_threads(3P)
NAME
use_threads - set the upper bound on the number of threads that the calling thread wants used
SUBROUTINE USE_THREADS(NTHREADS)
INTEGER NTHREADS
#include <sunperf.h>
void use_threads(int nthreads) ;
PURPOSE
USE_THREADS sets an upper bound on the number of threads that the calling thread wants used. Subsequent calls to this routine result in replacement of the previous Use number for the calling thread. This counts all threads working on the callers behalf, so if it passes 2 for NTHREADS and then calls some subroutine, there will be at most 1 additional thread started to do the computation. There is no restriction that the sum of all NTHREADS from USE_THREADS calls may not exceed the number of CPUs in a system.
ARGUMENTS
NTHREADS
(input) INTEGER
Upper bound on number of threads to use.
SunOS 5.0 — Last change: 10 Dec 1998