[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS System Services Reference Manual


Previous Contents Index


$SET_DEVICEW

Modifies the characteristics of a device or the paths used to access that device.

The $SET_DEVICEW completes synchronously; that is, it returns to the caller only after the requested action has taken effect.


Format

SYS$SET_DEVICEW [efn] [,chan] [,devnam] ,itmlst [,iosb] [,astadr] [,astprm] [,nullarg]


C Prototype

int sys$set_devicew (unsigned int efn, unsigned short int chan, void *devnam, void *itmlst, struct _iosb *iosb, void (*astadr)(__unknown_params), int astprm, struct_generic_64 *nullarg);


$SET_IMPLICIT_AFFINITY (Alpha and I64)

On Alpha and I64 systems, controls or retrieves the activation state for the implicit affinity system capability of a specific kernel thread or of the global process default.

This service accepts 64-bit addresses.


Format

SYS$SET_IMPLICIT_AFFINITY [pidadr] [,prcnam] [,state] [,cpu_id] [,prev_mask]


C Prototype

int sys$set_implicit_affinity (unsigned int *pidadr, void *prcnam, struct _generic_64 *state, int cpu_id, struct _generic_64 *prev_mask);


Arguments

pidadr


OpenVMS usage: process_id
type: longword (unsigned)
access: read only
mechanism: by 32- or 64-bit reference

Process identification (PID) of a kernel thread whose implicit affinity is to be modified or returned. The pidadr argument is the 32- or 64-bit address of a longword that contains the PID.

Process selection is made through a combination of the pidadr and prcnam arguments. If neither are specified or if both have a zero value, the service operations are made to the user capability mask of the current kernel thread of the current calling process. The pidadr argument takes precedence over the prcnam argument where both are supplied in the service call.

If the bit constant CAP$M_IMPLICIT_DEFAULT_ONLY is specified in the state argument, then the implicit affinity state portion of the default capability mask is modified or returned instead.

prcnam


OpenVMS usage: process_name
type: character-coded text string
access: read only
mechanism: by 32- or 64-bit descriptor--fixed-length string descriptor

Process name of the process whose implicit affinity capability state is to be modified or returned. The prcnam argument is the 32- or 64-bit address of a character string descriptor pointing to the process name string. A process can be identified with a 1- to 15-character string. The service operations are made to the user capability mask of the initial thread of the specified process.

If pidadr and prcnam are both specified, then pidadr is modified or returned and prcnam is ignored. If neither argument is specified, then the context of the current kernel thread of the calling process is modified or returned.

state


OpenVMS usage: mask_quadword
type: quadword (unsigned)
access: read only
mechanism: by 32- or 64-bit reference

State options that can be selected for the affected thread's implicit affinity. The state argument is a pointer to a quadword bit vector wherein a bit corresponds to a requested state for the implicit affinity feature. Only the bits specified below are used; the remainder of the quadword bits are reserved.

Each option (bit) has a symbolic name, defined in the $CAPDEF macro. The state argument is constructed by performing a logical OR operation using the symbolic names of each desired option.

The following table describes the symbolic name of each option:

Symbolic Name Description
CAP$M_IMPLICIT_DEFAULT_ONLY Indicates the specified operations are to be performed on the global cell instead of on a specific kernel thread. This bit supersedes any individual kernel thread specified in pidadr or prcnam. Specifying this bit constant applies the implicit affinity operations to all newly created processes.
CAP$M_IMPLICIT_AFFINITY_SET Indicates that the implicit affinity capability bit is to be set for the specified kernel thread. This is mutually exclusive with CAP$M_IMPLICIT_AFFINITY_CLEAR.
CAP$M_IMPLICIT_AFFINITY_CLEAR Indicates that the implicit affinity capability bit is to be cleared for the specified kernel thread. This is mutually exclusive with CAP$M_IMPLICIT_AFFINITY_SET.

cpu_id


OpenVMS usage: longword
type: longword (unsigned)
access: read only
mechanism: by value

Identifier of the CPU requested as the first CPU on which this kernel thread is to execute. The cpu_id is a longword containing this number, which is in the supported range of individual CPUs from 0 to SYI$_MAX_CPUS - 1 .

If no explicit CPU is needed, specifying a value of -1 in this argument indicates the system is to select the initial association based on system dynamics and load balancing.

Note that, regardless of what explicit CPU is supplied to this argument, it will be taken only as a suggestion. This service will attempt to make the requested association, but it will be superseded by another CPU if the system dynamics are adversely affected by the operation.

prev_mask


OpenVMS usage: mask_quadword
type: quadword (unsigned)
access: write only
mechanism: by 32- or 64-bit reference

Previous implicit affinity state mask for the specified kernel thread before execution of this call to $SET_IMPLICIT_AFFINITY. The prev_mask argument is the 32- or 64-bit address of a quadword into which $SET_IMPLICIT_AFFINITY writes a bit mask specifying the implicit affinity state.

The current state of the kernel thread's current implicit affinity feature can be determined by testing the returned mask with the symbolic bit definitions described for the state argument. These bit definitions are found in the $CAPDEF macro.


Description

The Modify Process Implicit Affinity system service modifies or returns the implicit affinity state for the specified kernel thread or from the system default process creation cell.

Setting a kernel thread's implicit affinity function indicates to the system that it is to schedule the process in ways that will maximize the cache and TB performance in the current symmetric multiprocessing (SMP) configuration. This might tend to bias the process towards specific CPUs more than the standard scheduling algorithm would normally have allowed.

Required Access or Privileges

The caller must have the ALTPRI privilege to call SYS$SET_IMPLICIT_AFFINITY to modify its own implicit affinity capability bit. To modify another process' capability mask, the caller must have:

ALTPRI---To modify any process with a matching UIC
ALTPRI and GROUP---To modify any process in the same UIC group
ALTPRI and WORLD---To modify any process

To call SYS$SET_IMPLICIT_AFFINITY simply to retrieve the state of a specific process or global bit, the caller need only have the following privileges:

None---To retrieve the state of itself or any process with a matching UIC
GROUP---To retrieve the state of any process in the same UIC group
WORLD---To retrieve the state of any process

Related Services

$CPU_CAPABILITIES, $PROCESS_CAPABILITIES, $PROCESS_AFFINITY


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_BADPARAM One or more arguments has an invalid value.
SS$_ACCVIO The service cannot access the locations specified by one or more arguments.
SS$_NOSUCHTHREAD The specified kernel thread does not exist.
SS$_NONEXPR The specified process does not exist, or an invalid process identification was specified.
SS$_IVLOGNAM The process name string has a length of 0 or more than 15 characters.
SS$_NOPRIV Insufficient privilege for attempted operation.
SS$_CPUCAP No CPU can run the specified process with new capabilities.
SS$_INSFARG Fewer than the required number of arguments were specified or no operation was specified.

$SET_PROCESS_PROPERTIESW (Alpha and I64)

On Alpha and I64 systems, sets a simple value associated with a process.

Format

SYS$SET_PROCESS_PROPERTIESW mbz1 ,pidadr ,prcnam ,property ,value ,prev_value [,bufsiz ,bufcnt ,flags]


C Prototype

int sys$set_process_propertiesw (unsigned int *pidadr, unsigned int *prcnam, unsigned int property, unsigned __int64 value, unsigned __int64 *prev_value,...);


Arguments

mbz1


type:
access:

Reserved for future use by HP. Must be specified as 0.

pidadr


OpenVMS usage: process_id
type: longword (unsigned)
access: modify
mechanism: by reference

Process identification (PID) of the process whose system service logging characteristics are to be modified. The pidadr argument is the address of the PID.

Supported only for use with PPROP$C_SS_LOG_ENABLE, PPROP$C_SS_LOG_DISABLE, and PPROP$C_SS_LOG_UNLOAD. Otherwise, must be specified as 0.

prcnam


OpenVMS usage: process_name
type: character-coded text string
access: read only
mechanism: by descriptor--fixed-length string descriptor

Process name of the process whose priority is to be changed. The prcnam argument is the address of a character string descriptor pointing to the process name. The process name can be 1 - 15 characters long.

You can use the prcnam argument only on behalf of processes in the same UIC group as the calling process. To affect system service logging for processes in other groups, you must specify the pidadr argument.

Supported only for use with PPROP$C_SS_LOG_ENABLE, PPROP$C_SS_LOG_DISABLE, and PPROP$C_SS_LOG_UNLOAD. Otherwise, must be specified as 0.

property


OpenVMS usage: integer
type: longword (unsigned)
access: read only
mechanism: by value

A constant that selects which property to set.

Valid values for property are defined by the $PPROPDEF macro as follows:

Property Code Description
PPROP$C_CASE_LOOKUP_TEMP The type of case lookup to use. This value is set for the life of the currently active image. This value reverts to the permanent case setting on image rundown. In the absence of an explicit case lookup specification in a user-provided NAML, RMS uses this value to determine the case setting for the current file operation.lid values are PPROP$K_CASE_BLIND and PPROP$K_CASE_SENSITIVE.

For additional information, see the Guide to OpenVMS File Applications.

PPROP$C_CASE_LOOKUP_PERM The type of case lookup to use. This value is set for the life of the process or until the case is set agairundown. Setting this value affects only future activated images for this process. To change the case setting for the current active image, you must modify the PPROP$C_CASE_LOOKUP_TEMP setting.

Valid values are PPROP$K_CASE_BLIND and PPROP$K_CASE_SENSITIVE.

For additional information, see the Guide to OpenVMS File Applications.

PPROP$C_DEADLOCK_WAIT The per-process deadlock wait time (in 100-ns units). A value of zero resets and disables the per-process deadlock wait time and fallback to the systemwide deadlock wait time that comes from the system parameter DEADLOCK_WAIT. Valid values are in the range of 100000 (=10ms) and 10000000 (=1 s). If the value is too small, the per-process deadlock wait is set to 10 ms; if the value is too large, it is set to 1 s.
PPROP$C_HOME_RAD The Resource Affinity Domain (RAD) to which the process is assigned. Newly mapped memory in the process will come from the home RAD of the process. Currently mapped memory will not move into the new home RAD unless $PURGWS is issued.

Valid values are integers between 0 and the maximum RAD on the system. Valid home RADs must also contain either memory or CPUs.

PPROP$C_MEDDLE Reserved for use by HP.
PPROP$C_MEDDLE_ENABLE Reserved for use by HP.
PPROP$C_PARSE_STYLE_TEMP The type of command parsing to use. This value is set only for the life of the image. The value reverts to the permanent style on image rundown. Valid values are PARSE_STYLE$C_TRADITIONAL and PARSE_STYLE$C_EXTENDED.
PPROP$C_PARSE_STYLE_PERM The type of command parsing to use. This value is set for the life of the process unless the style is set again. Valid values are PARSE_STYLE$C_TRADITIONAL and PARSE_STYLE$C_EXTENDED.
PPROP$C_SS_LOG_DISABLE Stop logging system service requests for the current or specified process. If logging was previously disabled, the value returned in prev_value is 0. If logging was previously enabled, the value returned is 1.

For more information, see the HP OpenVMS System Analysis Tools Manual.

PPROP$C_SS_LOG_ENABLE Allocate log buffers and enable logging of system service requests for the current or specified process. If logging was previously disabled, the value returned in prev_value is 0. If logging was previously enabled, the value returned is 1.

For more information, see the HP OpenVMS System Analysis Tools Manual.

PPROP$C_SS_LOG_UNLOAD Stop logging system service requests for the current or specified process and close the log file so that it can be analyzed. If logging was previously disabled, the value returned in prev_value is 0. If logging was previously enabled, the value returned is 1.

For more information, see the HP OpenVMS System Analysis Tools Manual.

PPROP$C_TOKEN Controls the token size used by DCL. When the bit is clear (the default), traditional tokens are used, and each command token can hold up to 255 characters. When the bit is set, extended tokens are used; each command token can be up to 4000 characters.
PPROP$C_UNITS Controls the process units. When the bit is clear (the default), all size-related numbers are displayed in blocks. When the bit is set, size-related numbers are converted to bytes.

value


OpenVMS usage: integer
type: quadword (unsigned)
access: read
mechanism: by value

A quadword value to which to set the property.

prev_value


OpenVMS usage: access_mode
type: quadword (unsigned) address of a quadword value
access: write
mechanism: by reference

The address of a quadword that will receive the previous value of the property.

bufsize


OpenVMS usage: longword_unsigned
type: longword (unsigned)
access: read only
mechanism: by value

The requested system service log buffer size in bytes. Supported only for use with PPROP$C_SS_LOG_ENABLE. If omitted, it defaults to 65,024 bytes. The maximum value is 65,024 bytes. The minimum value is 4096 bytes.

bufcnt


OpenVMS usage: longword_unsigned
type: longword (unsigned)
access: read only
mechanism: by value

The requested number of system service log buffers. Supported only for use with PPROP$C_SS_LOG_ENABLE. If omitted, it defaults to 2. The maximum number of buffers is 6.

flags


OpenVMS usage: mask_longword
type: longword (unsigned)
access: read only
mechanism: by value

Flag mask specifying the enable logging request. The flags argument is a longword bit vector in which each bit corresponds to a flag. The $LOGTYPDEF macro and the LOGTYPDEF.H file define a symbolic name for each flag.

The $LOGTYPDEF macro defines the following symbolic names for the fault characteristic codes:

Symbol Description
LOGTYP$M_ARGS Log system service arguments.
LOGTYP$M_FILE Write log information to a file.

If you specify the flags argument as 0, the service defaults to logging to a file and logging arguments.

If you specify LOGTYP$M_ARGS but lack privilege, service arguments are not logged.


Description

The $SET_PROCESS_PROPERTIESW system service sets a simple value associated with a process.

Generally, this service is used for changing process properties that have a maximum of a single quadword. You can change only one property at a time per call to this service.

Required Access or Privileges

To affect system service logging for another process, the calling process might need one of the following privileges:

  • GROUP privilege to affect a process in the same group, unless the target process has the same UIC as the calling process.
  • WORLD privilege to affect any process in the system.

To request logging the arguments passed to a system service, a process needs SETPRV, CMKRNL, or CMEXEC privilege.

Required Quota

When system service logging is enabled, the log buffers are charged against the process's paging file quota (PGFLQUOTA).

Related Services

$GETJPI


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_ACCVIO Access violation.
SS$_WRONGSTATE An attempt was made to modify system service logging characteristics of a process when logging is disabled systemwide.
SS$_NONEXPR The specified process does not exist, or an invalid process identification was specified.
SS$_NOPRIV The process does not have the privilege to affect the other process.
SS$_IVLOGNAM The process name string has a length of 0 or has more than 15 characters.

$SET_RESOURCE_DOMAIN

Controls the association between a calling process and resource domains.

Format

SYS$SET_RESOURCE_DOMAIN func ,rsdm_id ,domain_number ,[nullarg] ,[access] ,[acmode]


C Prototype

int sys$set_resource_domain (unsigned int func, unsigned int *rsdm_id, unsigned int domain_number, unsigned int nullarg, unsigned int access, unsigned int acmode);


Arguments

func


OpenVMS usage: function_code
type: longword (unsigned)
access: read only
mechanism: by value

Function code specifying the action that $SET_RESOURCE_DOMAIN is to perform. The func argument is a longword containing this function code. See the Function Codes section for a description of $SET_RESOURCE_DOMAIN function codes.

rsdm_id


OpenVMS usage: longword
type: longword (unsigned)
access: write only to join, read only to leave
mechanism: by reference

Resource domain identification. The rsdm_id argument is the address of a longword specifying the association of the calling process with the resource domain.

The RSDM$_JOIN_DOMAIN function returns a resource domain identification. The RSDM$_LEAVE function requires the rsdm_id argument as input to specify which resource domain association the process is leaving.

The resource domain identification can be used as input to the $ENQ and $ENQW system services.

domain_number


OpenVMS usage: longword
type: longword (unsigned)
access: read only
mechanism: by value

Domain number that identifies the resource domain. The domain_number argument is a longword value containing the resource domain number.

The domain_number argument is required for the RSDM$_JOIN_DOMAIN function but ignored for the RSDM$_LEAVE function.

nullarg


OpenVMS usage: null_arg
type: longword (unsigned)
access: read only
mechanism: by value

Placeholder reserved to HP. You must specify 0.

access


OpenVMS usage: mask_longword
type: longword (unsigned)
access: read only
mechanism: by value

Types of access desired when using the lock management services within the resource domain. The access argument is a longword bit mask specifying the access types required; these can include read, write, and lock.

The following table lists the symbols that the $RSDMDEF macro defines, their descriptions, and the lock management system services that might require each type of access:

Symbol Access Description System Service
RSDM$M_READ Read lock value blocks $DEQ, $ENQ, $ENQW, $GETLKI, $GETLKIW
RSDM$M_WRITE Write lock value blocks $DEQ, $ENQ, $ENQW,
RSDM$M_LOCK Take locks $ENQ, $ENQW

The service grants the desired access, provided your process has the necessary access rights to the resource domain. If you do not specify the access argument or if you specify 0, $SET_RESOURCE_DOMAIN attempts to access the domain in the following order:

  1. Read, write, lock
  2. Read, lock
  3. Write, lock
  4. Lock

The access attempt terminates with the first success.

The access argument defaults to 0. It is ignored for the RSDM$_LEAVE function.

acmode


OpenVMS usage: access_mode
type: longword (unsigned)
access: read only
mechanism: by value

Access mode requested for the association to the resource domain. The most privileged access mode granted is the access mode of the caller. Locks cannot be taken from access modes less privileged than the access mode of the association.


Previous Next Contents Index