pthread_setprio 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_setprio(3thr)					 pthread_setprio(3thr)

Name
       pthread_setprio - Changes the current priority of a thread

Syntax
       #include <pthread.h>

       int pthread_setprio (thread, priority)
       pthread_t thread;
       int priority;

Arguments
       thread  Thread whose priority is changed.

       priority
	       New  priority value of the thread specified in thread. The pri‐
	       ority value is dependent upon scheduling policy.	 Valid	values
	       fall within one of the following three ranges.

	       Low		High
	       PRI_FIFO_MIN	 PRI_FIFO_MAX

	       PRI_RR_MIN	 PRI_RR_MAX

	       PRI_OTHER_MIN	 PRI_OTHER_MAX

	       PRI_FG_MIN_NP
				PRI_FG_MAX_NP

	       PRI_BG_MIN_NP
				PRI_BG_MAX_NP

       If  you	create	a  new	thread without specifying a threads attributes
       object that contains a changed priority attribute, the default priority
       of  the	newly created thread is the midpoint between PRI_OTHER_MIN and
       PRI_OTHER_MAX (the midpoint between the minimum and the maximum for the
       SCHED_OTHER policy).

Description
       This  routine  changes  the current priority of a thread.  A thread can
       change its own priority using the identifier returned by pthread_self.

       Changing the priority of a thread can cause it to start executing or be
       preempted  by  another thread. The effect of setting different priority
       values depends on the scheduling priority assigned to the thread.   The
       initial	scheduling priority is set by calling the pthread_attr_setprio
       routine.

       Note that pthread_attr_setprio sets the priority attribute that is used
       to establish the priority of a new thread when it is created.  However,
       pthread_setprio changes the priority of an existing 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	   thread    is
			    invalid.

       -1	[ENOTSUP]   An attempt is  made
			    to	set  the policy
			    to	an  unsupported
			    value.

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

       -1	[EPERM]	    The caller does not
			    have  the appropri‐
			    ate	 privileges  to
			    set the priority of
			    the	      specified
			    thread.

							 pthread_setprio(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