Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > p

pset_getattr(2)

HP-UX 11i Version 1.6: June 2002
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

pset_getattr, pset_setattr — manage processor set attributes

SYNOPSIS

#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

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

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

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

The access permission bitmask for the processor set. These are defined similar to file access permissions. There are three types of access:

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

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

The processor set owner has EXEC access.

PSET_OWNER_READ

The processor set owner has READ access.

PSET_OWNER_WRITE

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

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 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

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

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

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

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

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

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

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.

PSET_ATTR_LASTSPU

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

Make the request fail if there are active threads and processes assigned to the processor set.

PSET_ATTRVAL_DFLTPSET

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

The functions return zero on successful completion. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

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

get_getattr and set_getattr were developed by HP.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2002 Hewlett-Packard Development Company, L.P.