MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                      thrgetprio(3C)



NAME
     thrgetprio, thrsetprio - access dynamic thread scheduling

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

     int thrsetprio(threadt targetthread, int priority);


     int thrgetprio(threadt targetthread, int *priority);


DESCRIPTION
     The thrsetprio() function sets the scheduling priority  for
     the  thread  specified  by  targetthread within the current
     process to the value given by priority.


     The thrgetprio() function stores the current  priority  for
     the  thread  specified  by  targetthread  in  the  location
     pointed to by priority.


     If the thrsetprio() function fails, the scheduling priority
     of the target thread is not changed.


     See     priocntl(2),      pthreadsetschedprio(3C),      and
     schedsetparam(3C).

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

ERORS
     The thrgetprio() and thrsetprio() functions will fail if:

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



     The  thrsetprio() function will fail if:

     EINVAL    The value of priority is invalid for the  schedul-
               ing policy of the specified thread.


     EPERM     The caller does not have the  appropriate  permis-
               sion to set the priority to the value specified.



SunOS 5.11           Last change: 1 Apr 2008                    1






Standard C Library Functions                      thrgetprio(3C)



ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     priocntl(2),  pthreadsetschedprio(3C),  schedsetparam(3C),
     thrcreate(3C),   thrsuspend(3C),   thryield(3C),   attri-
     butes(5), standards(5)






































SunOS 5.11           Last change: 1 Apr 2008                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™