pthread_attr_setschedpolicy man page on BSDOS

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

PTHREAD_ATTR_SCHEDPOLICY(3) BSD Programmer's ManualPTHREAD_ATTR_SCHEDPOLICY(3)

NAME
     pthread_attr_getschedpolicy, pthread_attr_setschedpolicy - pthread
     scheduling policy attribute objects

SYNOPSIS
     #include <pthread.h>
     #include <sched.h>

     int
     pthread_attr_getschedpolicy(pthread_attr_t *attr, int *policy);

     int
     pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);

DESCRIPTION
     This interface is defined by IEEE Std1003.1c (``POSIX'').

     The pthread_attr_getschedpolicy() and pthread_attr_setschedpolicy() func-
     tions retrieve and establish the threads scheduling policy attribute in
     the attribute object pointed to by attr. The policy should be specified
     as one of:

     SCHED_FIFO	    All threads created with the creation attribute attr are
		    scheduled in pre-emptive, priority order.  Rescheduling
		    can occur if a higher priority thread is made runnable or
		    the current thread explicitly causes another thread to run
		    by calling sched_yield().

     SCHED_RR	    All threads created with the creation attribute attr are
		    scheduled in pre-emptive, priority order with a time quan-
		    tum.  Rescheduling can occur if a higher priority thread
		    is made runnable, the current thread uses up its quantum,
		    or the current thread explicitly causes another thread to
		    run by calling sched_yield().

     SCHED_OTHER    All threads created with the creation attribute attr are
		    scheduled in an implementation defined way.	 In this im-
		    plementation SCHED_OTHER is the same as SCHED_RR.

     The default value for policy in an attribute object is SCHED_RR.

RETURN VALUES
     Upon successful completion, the pthread_attr_getschedpolicy and
     pthread_attr_setschedpolicy functions return 0.  A non-zero result indi-
     cates an error occurred.

ERRORS
     The pthread_attr_getschedpolicy and pthread_attr_setschedpolicy functions
     may fail and return the following error:

     [EINVAL]	   The value of a function argument is invalid.

SEE ALSO
     pthreads(3),  pthread_attr(3),  pthread_create(3),	 pthread_join(3),
     pthread_detach(3),

STANDARDS
     The pthread_attr_getschedpolicy and pthread_attr_setschedpolicy functions
     conform to IEEE Std1003.1c (``POSIX'').

HISTORY
     The pthread_attr_getschedpolicy and pthread_attr_setschedpolicy functions
     first appeared in BSD/OS 3.0.

BUGS
     Specifying SCHED_OTHER in a call to pthread_attr_setschedpolicy() is non-
     portable and is discouraged.

4th Berkeley Distribution	 June 3, 1996				     2
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

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