


POD_GETMAXPRI(3L) LIGHTWEIGHT PROCESSES LIBRARY POD_GETMAXPRI(3L)



NAME
     pod_getmaxpri, pod_getmaxsize, pod_setmaxpri -  control  LWP
     scheduling priority

SYNOPSIS
     int pod_getmaxpri()

     int pod_getmaxsize()

     int pod_setmaxpri(maxprio)
     int maxprio;

DESCRIPTION
     The LWP library is self-initializing: the  first  time   you
     use  a primitive that requires threads to be supported, _m_a_i_n
     is automatically converted into a thread.  A pod  will  ter-
     minate  when all client-created lightweight threads (includ-
     ing the thread bound to _m_a_i_n) are dead.

     By default, only a single priority (MINPRIO)  is  available.
     However, by using pod_setmaxpri(), you can make an arbitrary
     number (up to the limit imposed by  the  implementation)  of
     priorities  available.   The  _m_a_i_n  thread  will receive the
     highest available scheduling priority at the  time  of  ini-
     tialization.   By using pod_setmaxpri() before any other LWP
     primitives, you can ensure that main will receive  the  same
     priority     as    the    argument    to    pod_setmaxpri().
     pod_setmaxpri() can be called repeatedly,  as  long  as  the
     number  of  scheduling  priorities  (_m_a_x_p_r_i_o) increases with
     each call.

     pod_getmaxpri() returns  the  current  number  of  available
     priorities.   Priorities  are  numbered  from 1 (MINPRIO) to
     MAXPRIO.

     The implementation-dependent maximum  number  of  priorities
     available  can  be  retrieved  using pod_getmaxsize().  This
     value will never be less than 255.

RETURN VALUES
     pod_getmaxpri() returns the number of priority levels set by
     the most recent call to pod_setmaxpri().

     pod_getmaxsize() returns the maximum  number  of  priorities
     your system supports.

     pod_setmaxpri() returns:

     0    on success.

     -1   on failure.




Sun Release 4.1    Last change: 6 October 1987                  1






POD_GETMAXPRI(3L) LIGHTWEIGHT PROCESSES LIBRARY POD_GETMAXPRI(3L)



ERRORS
     pod_setmaxpri() will fail if one or more  of  the  following
     are true:

     LE_INVALIDARG       Attempt to allocate more priorities than
                         supported.

     LE_NOROOM           No internal memory left to create pod.















































Sun Release 4.1    Last change: 6 October 1987                  2



