thr_getprio man page on SunOS

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

thr_getprio(3C)		 Standard C Library Functions	       thr_getprio(3C)

NAME
       thr_getprio, thr_setprio - access dynamic thread scheduling

SYNOPSIS
       cc -mt [ flag... ] file...[ library... ]

       #include <thread.h>

       int thr_setprio(thread_t target_thread, int priority);

       int thr_getprio(thread_t target_thread, int *priority);

DESCRIPTION
       The  thr_setprio()  function  dynamically  changes  the priority of the
       thread specified by target_thread within the  current  process  to  the
       priority	 specified  by priority. By default, threads  contend for syn‐
       chronization objects  based on  fixed priorities that range from 0, the
       least  significant, to  127.  The target_thread will receive precedence
       by libthread over lower priority threads with respect  to  synchroniza‐
       tion object contention.

       The  thr_getprio()  function stores the current priority for the thread
       specified by target_thread in the  location  pointed  to	 by  priority.
       Thread priorities regulate the order in which threads unblock from syn‐
       chronization objects and are different from realtime priorities,	 which
       regulate	 and  enforce	access	to CPU	resources.  Programs that need
       access to "real" priorities should use bound threads  in	 the  realtime
       class  (see priocntl(2)).

RETURN VALUES
       If successful, the thr_getprio() and thr_setprio() return 0. Otherwise,
       an error number is returned to indicate the error.

ERRORS
       For each of the following conditions, these functions return  an	 error
       number if the condition is detected.

       ESRCH	       The  value specified by target_thread does not refer to
		       an existing thread.

       The  thr_getprio() and  thr_setprio() functions may fail if:

       EINVAL	       The value of priority makes no sense for the scheduling
		       class associated with the target_thread.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │MT-Level		     │MT-Safe			   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       priocntl(2),   sched_setparam(3RT),   thr_create(3C),  thr_suspend(3C),
       thr_yield(3C), attributes(5), standards(5)

SunOS 5.10			  22 Mar 2001		       thr_getprio(3C)
[top]

List of man pages available for SunOS

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