Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

threads(5)



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


NAME
       dgpthreadgroupattrinit, dgpthreadgroupattrdestroy - thread
       group attributes objects

SYNOPSIS
       #include <pthread.h>

       int dgpthreadgroupattrinit(dgpthreadgroupattrt *attr);

       int dgpthreadgroupattrdestroy(dgpthreadgroupattrt *attr);

   where:
       attr        A pointer to a thread group attributes object

DESCRIPTION
       DG thread group attributes objects are opaque collections of thread
       group attributes that are used to override the default creation
       attributes in calls to dgpthreadgroupcreate().  They can also be
       used to change certain scheduling attributes, such as scheduling
       policy and priority, of existing thread groups with calls to
       dgpthreadgroupsetschedattr().

       Thread group attributes objects are manipulated only by object-
       oriented functions described here and in other man pages listed
       below.  The use of opaque attributes objects provides a clean
       isolation of the configurable aspects of thread groups and an
       extensible mechanism for adding future DG attributes.

       DG attributes are provided to specify the scheduling inheritance,
       policy, and priority of a thread group.  These attributes are similar
       to those for threads.  The scheduling policy and priority attributes
       are the only attributes that can be modified or retrieved for an
       existing thread group.

       Before a thread group attributes object can be used, it must be
       initialized by a call to dgpthreadgroupattrinit.  After it has
       been initialized, individual attributes are specified by other
       object-oriented calls, then the attributes object is passed to a call
       to dgpthreadgroupcreate() or dgpthreadgroupsetschedattr().
       Upon return from such a call, the attributes object is no longer
       associated with the affected thread group, and can be destroyed by a
       call to dgpthreadgroupattrdestroy().  If desired, the attributes
       object need not be destroyed; it can instead be used in subsequent
       calls to dgpthreadgroupcreate() or
       dgpthreadgroupsetschedattr().

       The following functions initialize and destroy thread group
       attributes objects:

   dgpthreadgroupattrinit()
       This function initializes the thread group attributes object pointed
       to by attr with the default values for all thread group attributes.
       Consult the other man pages below for the default values under DG/UX.




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




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


   dgpthreadgroupattrdestroy()
       This function destroys the thread group attributes object pointed to
       by attr.  The attributes object should have been initialized by a
       previous call to dgpthreadgroupattrinit().  The behavior of using
       the attributes object after it has been destroyed is undefined.  If
       DG/UX detects that an attributes object is uninitialized or
       destroyed, it will cause the using function to fail with EINVAL.

DIAGNOSTICS
   Returns
       If successful, these functions return 0.  Otherwise they return -1
       and set errno to indicate the error.

   Errors
       For each of the following conditions, dgpthreadgroupattrdestroy()
       returns -1 and sets errno to the corresponding value:

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

SEE ALSO
       dgpthreadgroupattrsetinheritsched(3T),
       dgpthreadgroupattrgetinheritsched(3T),
       dgpthreadgroupattrsetsched(3T), dgpthreadgroupattrgetsched(3T),
       dgpthreadgroupattrsetprio(3T), dgpthreadgroupattrgetprio(3T),
       dgpthreadgroupcreate(3T), dgpthreadgroupsetschedattr(3T),
       dgpthreadgroupgetschedattr(3T), dgpthreadattrsetgroup(3T),
       dgpthreadattrgetgroup(3T), threads(5).

NOTES
       Attributes objects are provided for threads, mutexes, condition
       variables, and DG thread groups.   While the attributes vary from
       entity to entity, the style of the interfaces is consistent.   For DG
       thread groups, scheduling attributes similar to those for threads are
       provided, but they affect the global scheduling of the target thread
       group.

       The effect of passing a NULL pointer to dgpthreadgroupcreate() is
       the same as passing a pointer to a newly initialized thread group
       attributes object.  Both cases cause the default attributes to be
       used.  In particular, the scheduling attributes are inherited from
       the creating thread group.

       Refer to dgpthreadattrsetgroup(3T) for specifying the group ID of
       the group in which a newly created thread is to be created.  The
       current discussion treats only the attributes for thread groups,
       themselves.








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


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