Index of Section 2 Manual Pages

Interix / SUApthread_setconcurrency.2Interix / SUA

pthread_setconcurrency(2)                     pthread_setconcurrency(2)

  pthread_getconcurrency()

  NAME

    pthread_getconcurrency(), pthread_setconcurrency - get or set concurrency
    level

  SYNOPSIS

    #include 

    int pthread_getconcurrency(void);
    int pthread_setconcurrency(int new_level);

  DESCRIPTION

    The pthread_setconcurrency(2) function requests a new concurrency level,
    specified by the new_level argument, for the calling thread's process. By
    default, a sufficient number of threads are maintained active for a
    process to ensure that the process can continue to make progress. However,
    this level of concurrency might not be most effective for a particular
    application. The pthread_setconcurrency() function allows a process to
    suggest a higher concurrency level for the process, but this request will
    not necessarily be honored.

    Calling pthread_setconcurrency() with new_level set to zero sets the
    concurrency level to the default, as though pthread_setconcurrency() had
    never been called.

    The pthread_getconcurrency(2) function returns the current concurrency
    level of the calling thread's process.

  RETURN VALUES

    On success, the pthread_setconcurrency() function returns 0; otherwise, an
    error code is returned.

    The pthread_getconcurrency() function returns the calling thread's process
    concurrency level. If pthread_setconcurrency() has never been called, then
    pthread_getconcurrency() returns zero.

  ERRORS

    The pthread_setconcurrency() function can fail for the following reasons:

    [EINVAL]
        The new_level is less than zero.

    [EAGAIN]
        The value specified by new_level would exhaust a system resource.

    This functions do not return [EINTR].

  USAGE NOTES

    All of these functions are thread safe.

    None of these functions are async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA