pthread_setschedparam

Sets the scheduling policy for the specified thread.

Library:LibC
Classification:POSIX
Service:Threads

Syntax

  #include <pthread.h>
  
  int pthread_setschedparam (
     pthread_t                   thread,
     int                         policy,
     const struct sched_param   *param);
  

Parameters

thread

(IN) Specifies the thread.

policy

(IN) Specifies the policy for the thread. For a list of possible values, see Section 55.1.1, Schedule Policies.

param

(IN) Points the structure containing the scheduling parameters for the specified policy.

Return Values

If successful, returns 0; otherwise, returns a nonzero error code:

Decimal

Constant

Description

9

EINVAL

The value in the sched_priority field is invalid.

77

ERSCH

The thread parameter does not refer to an existing thread.

Remarks

NetWare does not currently support multiple scheduling policies. It uses a default policy of FIFO.

See Also