Index of Section 2 Manual Pages

Interix / SUApthread_setschedprio.2Interix / SUA

pthread_setschedprio(2)                         pthread_setschedprio(2)

  pthread_setschedprio()

  NAME

    pthread_setschedprio() - set scheduling priority for a thread

  SYNOPSIS

    #include 

    int pthread_setschedprio(pthread_t thread, int prio);

  DESCRIPTION

    The pthread_setschedprio(2) function sets the scheduling priority for the
    thread identified by the thread argument to the value supplied by the prio
    argument. The effective thread priority is equal to the process priority
    (determined from the nice(2) value of the process) plus the thread
    priority that is set by this function.

    An application can use this function to temporarily raise and then lower
    the priority of a thread without having the side effect of yielding to
    other threads with the same priority.

  RETURN VALUES

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

  ERRORS

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

    [EINVAL]
        The value of the prio argument is invalid for the scheduling policy of
        the specified thread.

    [ENOTSUP]
        The prio argument is set to an unsupported value.

    [EPERM]
        The caller does not have the permissions required to perform the
        operation, or the application is not allowed to set the priority to
        the specified value.

    [ESRCH]
        The thread argument does not identify an existing thread.

    This function does not return [EINTR].

  SEE ALSO

    pthread_getschedparam(2)

    sched_get_priority_max(2)

  USAGE NOTES

    The pthread_setschedprio function is thread safe.

    The pthread_setschedprio function is not async-signal safe.


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