*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> pthread_attr_setschedparam (3)              
Title
Content
Arch
Section
 

pthread_attr_setschedparam(3)

Contents


NAME    [Toc]    [Back]

       pthread_attr_setschedparam  -  Changes  the  values of the
       parameters associated with  a  scheduling  policy  of  the
       specified thread attributes object

SYNOPSIS    [Toc]    [Back]

       #include <pthread.h>

       int pthread_attr_setschedparam(
               pthread_attr_t *attr,
               const struct sched_param *param );

LIBRARY    [Toc]    [Back]

       DECthreads POSIX 1003.1c Library (libpthread.so)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       IEEE Std 1003.1c-1995, POSIX  System  Application  Program
       Interface

PARAMETERS    [Toc]    [Back]

       Thread  attributes  object for the scheduling policy whose
       parameters are to be set.  A structure containing new values
 for scheduling parameters associated with the scheduling
 policy attribute of the  specified  thread  attributes
       object.  Note that DECthreads provides only the sched_priority
 scheduling parameter.  See the  Description  section
       for information about this scheduling parameter.

DESCRIPTION    [Toc]    [Back]

       This  routine  sets  the  scheduling parameters associated
       with  the  scheduling  policy  attribute  of  the   thread
       attributes object specified by the attr argument.

       Use the sched_priority field of a sched_param structure to
       set a thread's  execution  priority.  The  effect  of  the
       scheduling  priority  you assign depends on the scheduling
       policy specified for the attributes  object  specified  by
       the attr argument.

       By  default, a created thread inherits the priority of the
       thread calling pthread_create(3). To  specify  a  priority
       using  this  routine,  scheduling inheritance must be disabled
 at the time the thread is  created.  Before  calling
       pthread_create(3),   call  pthread_attr_setinheritsched(3)
       and  specify  the  value  PTHREAD_EXPLICIT_SCHED  for  the
       inherit argument.

       An  application  specifies  priority  only  to express the
       urgency of executing the thread relative to other threads.
       DO  NOT  USE  PRIORITY  TO  CONTROL  MUTUAL EXCLUSION WHEN
       ACCESSING SHARED DATA. With a sufficient number of processors
  present,  all ready threads, regardless of priority,
       execute simultaneously.

       Valid values of the  sched_priority  scheduling  parameter
       depend on the chosen scheduling policy. Use the POSIX routines
   sched_get_priority_min(3)   or    sched_get_priority_max(3)  to  determine  the low and high limits of each
       policy.

       Additionally,  DECthreads  provides  nonportable  priority
       range  constants, as follows: PRI_FIFO_MIN to PRI_FIFO_MAX
       PRI_RR_MIN to PRI_RR_MAX  PRI_OTHER_MIN  to  PRI_OTHER_MAX
       PRI_FG_MIN_NP    to    PRI_FG_MAX_NP    PRI_BG_MIN_NP   to
       PRI_BG_MAX_NP

       The default priority varies  by  DECthreads  platform.  On
       Tru64 UNIX, the default is 19 (that is, the POSIX priority
       of a normal timeshare process).  On other  platforms,  the
       default priority is the midpoint between PRI_FG_MIN_NP and
       PRI_FG_MAX_NP.

RETURN VALUES    [Toc]    [Back]

       If an error condition  occurs,  this  routine  returns  an
       integer  value  indicating  the  type  of  error. Possible
       return values are as follows: Successful completion.   The
       value  specified by param is not a valid thread attributes
       object, or the value specified by param  is  invalid.   An
       attempt  was  made  to set the attribute to an unsupported
       value.

ERRORS    [Toc]    [Back]

       None

SEE ALSO    [Toc]    [Back]

      
      
       Functions:  pthread_attr_init(3),   pthread_attr_getschedparam(3),                 pthread_attr_setinheritsched(3),
       pthread_attr_setschedpolicy(3),         pthread_create(3),
       sched_yield(3)

       Manuals: Guide to DECthreads and Programmer's Guide



                                    pthread_attr_setschedparam(3)
[ Back ]
 Similar pages
Name OS Title
pthread_getschedparam Tru64 Obtains the current scheduling policy and scheduling parameters of a thread
sched_setscheduler Tru64 Sets the scheduling policy and scheduling parameters of the specified process (P1003.1b)
pthread_setschedparam Tru64 Changes a thread's scheduling policy and scheduling parameters
sched_getscheduler FreeBSD set/get scheduling policy and scheduler parameters
sched_setscheduler FreeBSD set/get scheduling policy and scheduler parameters
pthread_attr_setschedpolicy Tru64 Changes the scheduling policy attribute of the specified thread attributes object
pthread_attr_getschedpolicy Tru64 Obtains the scheduling policy attribute of the specified thread attributes object
pthread_attr_getschedparam Tru64 Obtains the scheduling parameters for an attribute of the specified thread attributes object
sched_setscheduler IRIX set the scheduling policy of a process
sched_getscheduler IRIX get the scheduling policy of a process
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service