pset_getattr(2) pset_getattr(2)
NAME [Toc] [Back]
pset_getattr, pset_setattr - manage processor set attributes
SYNOPSIS [Toc] [Back]
#include <sys/pset.h>
int pset_getattr(
psetid_t pset,
pset_attrtype_t type,
pset_attrval_t* val);
int pset_setattr(
psetid_t pset,
pset_attrtype_t type,
pset_attrval_t val);
DESCRIPTION [Toc] [Back]
The pset_getattr() function returns the current value of the attribute
type for the processor set pset in the memory location pointed to by
val.
The pset_setattr() function assigns the value val to the attribute
type for processor set pset.
A user can not change the attribute values for the system default
processor set PS_DEFAULT using the pset_setattr() function.
A superuser, a PRIV_PSET privilege user, or a user with READ
permission for the processor set may query any attribute values.
The following processor set attributes may be queried or changed
through these functions:
PSET_ATTR_GRPID [Toc] [Back]
The GID (group id) of the processor set owner. The creator's
GID is assigned at processor set creation time. A
superuser, a PRIV_PSET privilege user, or the pset owner may
change value of this attribute.
PSET_ATTR_OWNID [Toc] [Back]
The UID of the processor set owner. The creator is assigned
as the owner at processor set creation time. A superuser, a
PRIV_PSET privilege user, or the pset owner may change value
of this attribute.
PSET_ATTR_PERM [Toc] [Back]
The access permission bitmask for the processor set. These
are defined similar to file access permissions. There are
three types of access:
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
pset_getattr(2) pset_getattr(2)
EXEC The user can bind its process or thread to the
processor set using the pset_bind() function (see
pset_bind(2)).
READ The user can query the processor set attributes.
WRITE The user can modify the processor set attributes
and configuration, and destroy the processor set.
Following bit values are used for the access bitmask:
PSET_GROUP_EXEC All users in processor set owner's group
has EXEC access.
PSET_GROUP_READ [Toc] [Back]
All users in processor set owner's group
has READ access.
PSET_GROUP_WRITE All users in processor set owner's group
has WRITE access.
PSET_OTHER_EXEC All others have EXEC access.
PSET_OTHER_READ All others have READ access.
PSET_OTHER_WRITE All others have WRITE access.
PSET_OWNER_EXEC [Toc] [Back]
The processor set owner has EXEC access.
PSET_OWNER_READ [Toc] [Back]
The processor set owner has READ access.
PSET_OWNER_WRITE [Toc] [Back]
The processor set owner has WRITE access.
A newly created processor set by default has READ and EXEC
access for everyone, but WRITE access only for the processor
set owner.
A superuser, a PRIV_PSET privilege user, or the pset owner
may change value of the PSET_ATTR_PERM attribute.
PSET_ATTR_IOINTR [Toc] [Back]
A value of PSET_ATTRVAL_ALLOW indicates that processors in
this processor set are configured to receive external
interrupts. It may be assigned a value of
PSET_ATTRVAL_DISALLOW to disable all processors in the
processor set from receiving and processing external I/O
interrupts. Not all platforms may support this feature. By
default, I/O interrupts are enabled on all processors. The
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
pset_getattr(2) pset_getattr(2)
feature may be useful for some realtime applications where
unpredictable interrupt handling overhead may adversely
impact the application's response time requirements.
Only a superuser or a PRIV_PSET privilege user may change
this attribute.
PSET_ATTR_NONEMPTY [Toc] [Back]
Indicates the behavior when a request to destroy a non-empty
processor set is made through the pset_destroy() function.
Possible values are:
PSET_ATTRVAL_DFLTPSET [Toc] [Back]
Reassign all processors in the processor set pset
to the system default processor set. Migrate all
threads and processes bound to this processor set
to the system default processor set. This is the
default value for this attribute.
PSET_ATTRVAL_FAIL [Toc] [Back]
Make the request fail with an [EBUSY] error if
there are threads or processes bound to the
processor set or if there are processors assigned
to the processor set.
PSET_ATTRVAL_FAILBUSY [Toc] [Back]
Make the request fail with an [EBUSY] error if
there are active threads or processes bound to the
processor set. Otherwise, perform the operation by
reassigning the processors in the pset to the
system default processor set.
A superuser, a PRIV_PSET privilege user, or a user with
WRITE permissions may change value of this attribute.
PSET_ATTR_EMPTY [Toc] [Back]
Indicates the behavior when a request to bind a process or a
thread to an empty processor set is made through the pset_bind()
function. Possible values are:
PSET_ATTRVAL_ALLOW [Toc] [Back]
Go through with the request. However, the affected
threads will not be scheduled to execute until a
processor is assigned to the empty processor set.
PSET_ATTRVAL_FAIL [Toc] [Back]
Reject the request with an [EINVAL] error. This is the
default value for this attribute.
A superuser, a PRIV_PSET privilege user, or a user with WRITE
permissions may change value of this attribute.
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
pset_getattr(2) pset_getattr(2)
PSET_ATTR_LASTSPU [Toc] [Back]
Indicates the behavior when a request to remove the last
processor from a processor set is made through the pset_assign()
function, or through the processor deallocation functionality.
Possible values are:
PSET_ATTRVAL_FAIL [Toc] [Back]
Make the request fail if there are active threads and
processes assigned to the processor set.
PSET_ATTRVAL_DFLTPSET [Toc] [Back]
Assign the processor to the specified processor set,
and migrate all threads and processes to the system
default processor set PS_DEFAULT. This is the default
value for this attribute.
A superuser, a PRIV_PSET privilege user, or a user with WRITE
permissions may change the value of the PSET_ATTR_LASTSPU
attribute.
The default value for any attribute can be assigned using the
PSET_ATTRVAL_DEFAULT value in the pset_setattr() function.
RETURN VALUE [Toc] [Back]
The functions return zero on successful completion. Otherwise, -1 is
returned and errno is set to indicate the error.
ERRORS [Toc] [Back]
pset_getattr() or pset_setattr() fails if one or more of the following
is true:
[EFAULT] The memory location pointed to by val is not writable
by the user for pset_getattr().
[EINVAL] The specified processor set pset, the attribute type,
or the attribute val is invalid.
[EINVAL] The memory location pointed to by val is NULL for
pset_getattr().
[ENOSYS] The processor set functionality is not supported by
the underlying HP-UX version.
[ENOTSUP] The requested attribute value is not supported for
the pset_setattr() function.
[EPERM] The user does not have the necessary permissions to
query or change the processor set attributes.
AUTHOR [Toc] [Back]
get_getattr and set_getattr were developed by HP.
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003
pset_getattr(2) pset_getattr(2)
SEE ALSO [Toc] [Back]
psrset(1M), pset_assign(2), pset_bind(2), pset_create(2), pset_ctl(2),
pset_destroy(2), privgrp(4).
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: August 2003 [ Back ] |