158  4.  ++-   

        -
 :

pthread_attr_getinheritsched()
pthread_attr_getschedpolicy()
pthread_attr_getschedparam()



#include <pthread.h>

#include <sched.h>

void pthread_attr_setinheritsched(

pthread_attr_t *attr,
int inheritsched) ;

void pthread_attr_setschedpolicy(

pthread_attr_t *attr,
int policy) ;

void pthread_attr_setschedparam(

pthread_attr_t *restrict attr,
const struct sched_param *restrict param) ;

 pthread_attr_setinheritsched(), pthread_attr_setschedpolicy()
 pthread_attr_setschedparam()     -
   .  pthread_attr_setinheritsched() -
 ,      :  -
  -       .
 inheritsched      .

PTHREAD_INHERIT_SCHED         -
  -,    -
 ,  
attr,  .

PTHREAD_EXPLICIT_SCHED       -
     ,
  ,   attr.

  inheritsched   PTHREAD_EXPLICIT_SCHED, 
 pthread_attr_setschedpolicy()    
,   pthread_attr_setschedparam ()   .

 pthread_attr_setschedpolicy ()    -
  (  attr), ""   
.  policy      , -
   <sched. h>.

SCHED_FIFO      FIFO ( ,  -
),      .
SCHED_RR       ,    

       .

SCHED_OTHER      ( ).
       
 .