PLWP_GETASRS(3PROC) Process Control Library Functions PLWP_GETASRS(3PROC)

NAME


Plwp_getasrs, Plwp_setasrs - get and set SPARCv9 ancillary state registers

LIBRARY


Process Control Library (libproc, -lproc)

SYNOPSIS


#include <libproc.h>

int
Plwp_getasrs(struct ps_prochandle *P, lwpid_t lwpid, asrset_t asrs);

int
Plwp_setasrs(struct ps_prochandle *P, lwpid_t lwpid, const asrset_t asrs);

DESCRIPTION


The Plwp_getasrs() and Plwp_setasrs() functions get and set the ancillary
thread-specific register set of the thread lwpid in the process handle P.

The ancillary state registers are only present on 64-bit SPARCv9 processes.
They contain information that is specific to the platform and are not
included in the information obtained through functions such as
Plwp_getregs(3PROC), Plwp_getfpregs(3PROC), and Plwp_getxregs(3PROC).

The Plwp_getasrs() function reads the ancillary registers into asrs, while
the Plwp_setasrs() sets the thread's ancillary registers to the values
provided by asrs.

Processes should be stopped prior to obtaining the register state of
individual threads. Processes may be stopped with Pstop(3PROC).

The asrset_t structure is described in proc(4).

One may not set the register values of a process that is not an active
process, e.g. a process handle that refers to a file or a core file.

RETURN VALUES


Upon successful completion, the Plwp_getasrs() and Plwp_setasrs() functions
return 0 and get or set the register state. Otherwise, -1 is returned and
errno is set to indicate the error.

ERRORS


For a full list of possible errors see the DIAGNOSTICS section in proc(4).

The Plwp_getasrs() and Plwp_setasrs() function will fail if:

ENODATA The process handle P does not have any ancillary
register state information.

EBUSY The process handle P refers to a live process and it is
not stopped.

ENOENT The process handle P refers to a live process and there
is no thread with id lwpid or it is not a 64-bit SPARCv9
process.

EINVAL The process handle P refers to a core file and there is
no thread with id lwpid.

ARCHITECTURE


The Plwp_getasrs() and Plwp_setasrs() functions are only available on
64-bit SPARCv9 platforms.

INTERFACE STABILITY


Uncommitted

MT-LEVEL
See LOCKING in libproc(3LIB).

SEE ALSO


libproc(3LIB), Plwp_getfpregs(3PROC), Plwp_getregs(3PROC),
Plwp_setregs(3PROC), Plwp_setregs(3PROC), Pstop(3PROC), proc(4)

illumos May 11, 2016 illumos