pthread_attr_setinheritsched man page on Ultrix

Man page or keyword search:  
man Server   3690 pages
apropos Keyword Search (all sections)
Output format
Ultrix logo
[printable version]

pthread_attr_setinheritsched(3thr)	    pthread_attr_setinheritsched(3thr)

Name
       pthread_attr_setinheritsched - Changes the inherit scheduling attribute
       of the specified thread attributes object.

Syntax
       #include <pthread.h>

       int pthread_attr_setinheritsched (attr, inherit)
       pthread_attr_t *attr;
       int inherit;

Arguments
       attr    Thread attributes object to be modified.

       inherit New value for the inherit scheduling  attribute.	 Valid	values
	       are as follows:

	       INHERIT_SCHED   This is the default value.
			       The created thread  inher‐
			       its  the	 current priority
			       and scheduling  policy  of
			       the     thread	  calling
			       pthread_create.

	       DEFAULT_SCHED   The created thread  starts
			       execution  with the prior‐
			       ity and scheduling  policy
			       stored	in   the   thread
			       attributes object.

Description
       This routine changes the inherit scheduling attribute  of  thread  cre‐
       ation.  The inherit scheduling attribute specifies whether threads cre‐
       ated using the specified thread attributes object inherit the  schedul‐
       ing attributes of the creating thread, or use the scheduling attributes
       stored in the thread attributes object that is passed  to  pthread_cre‐
       ate.

       The  first  thread in an application that is not created by an explicit
       call to pthread_create has a scheduling policy of SCHED_OTHER.  See the
       pthread_attr_setprio and pthread_attr_setsched routines for more infor‐
       mation on valid priority values and  valid  scheduling  policy  values,
       respectively.

       Inheriting  scheduling  attributes  (instead  of	 using	the scheduling
       attributes stored in the attributes object) is useful when a thread  is
       creating	 several  helper  threads---threads  that are intended to work
       closely with the creating thread to cooperatively solve the same	 prob‐
       lem.  For  example,  inherited scheduling attributes ensure that helper
       threads created in a sort routine execute with the same priority as the
       calling thread.

Return Values
       If an error condition occurs, this routine returns -1 and sets errno to
       the corresponding error value.  Possible return values are as follows.

       Return	Error	   Description
       0		   Successful  comple‐
			   tion.

       -1	[EINVAL]   The value specified
			   by attr is invalid.

       -1	[ESRCH]	   The value specified
			   by  attr  does  not
			   refer to an	exist‐
			   ing		thread
			   attributes object.

					    pthread_attr_setinheritsched(3thr)
[top]

List of man pages available for Ultrix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net