Multithreaded Programming Guide

Getting the Thread Concurrency Level

pthread_getconcurrency(3C) returns the value set by a previous call to pthread_setconcurrency().

pthread_getconcurrency Syntax

#include <pthread.h>

int pthread_getconcurrency(void);

If the pthread_setconcurrency() function was not previously called, pthread_getconcurrency() returns zero.

pthread_getconcurrency Return Values

pthread_getconcurrency() always returns the concurrency level set by a previous call to pthread_setconcurrency() . If pthread_setconcurrency() has never been called, pthread_getconcurrency() returns zero.