Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dg_pthread_group_getschedattr(3T) — DG/UX 5.4R3.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

threads(5)



DG/UX 5.4R3.00                             dg_pthread_group_getschedattr(3T)


NAME
       dgpthreadgroupgetschedattr, dgpthreadgroupsetschedattr - get or
       set thread group scheduling attributes

SYNOPSIS
       #include <pthread.h>

       int dgpthreadgroupgetschedattr(dgpthreadgroupt threadgroup,
                                         dgpthreadgroupattrt *attrs);

       int dgpthreadgroupsetschedattr(dgpthreadgroupt threadgroup,
                                         dgpthreadgroupattrt *attrs);

   where:
       threadgroup
               The target thread group's ID
       attrs   A pointer to a thread group attributes object

DESCRIPTION
       The dgpthreadgroupgetschedattr() and
       dgpthreadgroupsetschedattr() functions retrieve and set the
       scheduling attributes of the thread group whose thread group ID is
       given by threadgroup.  For these calls, only the scheduling policy
       and priority attributes are manipulated.  Other attributes are
       neither retrieved nor modified.

       The dgpthreadgroupgetschedattr() function retrieves the scheduling
       policy and priority for the thread group whose thread group ID is
       given by threadgroup and stores those values in the attributes
       object pointed to by attrs.  The dgpthreadgroupsetschedattr()
       function sets the scheduling policy and priority for the thread group
       whose thread group ID is given by threadgroup to values provided in
       the attributes object pointed to by attrs.  These new attributes
       always apply globally, as all thread groups are scheduled with global
       contention scope.

       Refer to dgpthreadgroupsetsched(3T), dgpthreadgroupprio(3T),
       and <sched.h> for detailed descriptions of the scheduling policy and
       priority attributes.

       The values in the attributes object pointed to by attrs are not
       checked for full validity until they are used in calls to
       dgpthreadgroupsetschedattr and other functions such as
       dgpthreadgroupcreate().  Hence it is possible that certain
       combinations of values are either illegal or not permitted for the
       caller of these functions.

       Typically the user of these functions calls
       dgpthreadgroupgetschedattr() to retrieve the current scheduling
       policy and priority of the target thread group, modifies one or both
       of these values in the attributes object, then calls
       dgpthreadgroupsetschedattr() to cause the new values to take
       affect for the target thread group.




Licensed material--property of copyright holder(s)                         1




DG/UX 5.4R3.00                             dg_pthread_group_getschedattr(3T)


       If the dgpthreadgroupsetschedattr() fails, no scheduling
       attributes are changed for the target thread group.

DIAGNOSTICS
   Return Value
       If successful, dgpthreadgroupgetschedattr() and
       dgpthreadgroupsetschedattr() return 0.  Otherwise, they return -1
       and set errno.

   Errors
       For each of the following conditions, dgpthreadgroupgetschedattr()
       and dgpthreadgroupsetschedattr() return -1 and set errno to the
       corresponding value:

       [ESRCH]   The value specified by threadgroup does not refer to an
                 existing thread group.

       [EINVAL]  An invalid attributes object has been specified.  This
                 occurs when DG/UX has detected that the attributes object
                 pointed to by attrs has not been initialized by a previous
                 call to dgpthreadgroupattrinit() or has been corrupted.

       For each of the following conditions, dgpthreadgroupsetschedattr()
       returns -1 and set errno to the corresponding value:

       [EINVAL]  An invalid combination of scheduling policy and priority
                 has been specified in the attributes object pointed to by
                 attrs.

       [EPERM]   The caller does not have the appropriate privileges to set
                 either the priority or the scheduling policy of the
                 specified thread group.

SEE ALSO
       dgpthreadgroupattrsetsched(3T), dgpthreadgroupattrsetprio(3T),
       schedsetparam(2), schedsetscheduler(2), threads(5).

NOTE
       Following the get-modify-set paradigm described above is advisable,
       as it conforms more easily to the addition of future scheduling
       attributes.
















Licensed material--property of copyright holder(s)                         2


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026