1 PLWP_GETASRS(3PROC)    Process Control Library Functions   PLWP_GETASRS(3PROC)
   2 
   3 NAME
   4      Plwp_getasrs, Plwp_setasrs - get and set SPARCv9 ancillary state
   5      registers
   6 
   7 LIBRARY
   8      Process Control Library (libproc, -lproc)
   9 
  10 SYNOPSIS
  11      #include <libproc.h>
  12 
  13      int
  14      Plwp_getasrs(struct ps_prochandle *P, lwpid_t lwpid, asrset_t asrs);
  15 
  16      int
  17      Plwp_setasrs(struct ps_prochandle *P, lwpid_t lwpid,
  18          const asrset_t asrs);
  19 
  20 DESCRIPTION
  21      The Plwp_getasrs() and Plwp_setasrs() functions get and set the ancillary
  22      thread-specific register set of the thread lwpid in the process handle P.
  23 
  24      The ancillary state registers are only present on 64-bit SPARCv9
  25      processes.  They contain information that is specific to the platform and
  26      are not included in the information obtained through functions such as
  27      Plwp_getregs(3PROC), Plwp_getfpregs(3PROC), and Plwp_getxregs(3PROC).
  28 
  29      The Plwp_getasrs() function reads the ancillary registers into asrs,
  30      while the Plwp_setasrs() sets the thread's ancillary registers to the
  31      values provided by asrs.
  32 
  33      Processes should be stopped prior to obtaining the register state of
  34      individual threads.  Processes may be stopped with Pstop(3PROC).
  35 
  36      The asrset_t structure is described in proc(4).
  37 
  38      One may not set the register values of a process that is not an active
  39      process, e.g. a process handle that refers to a file or a core file.
  40 
  41 RETURN VALUES
  42      Upon successful completion, the Plwp_getasrs() and Plwp_setasrs()
  43      functions return 0 and get or set the register state.  Otherwise, -1 is
  44      returned and errno is set to indicate the error.
  45 
  46 ERRORS
  47      For a full list of possible errors see the DIAGNOSTICS section in
  48      proc(4).
  49 
  50      The Plwp_getasrs() and Plwp_setasrs() function will fail if:
  51 
  52      ENODATA            The process handle P does not have any ancillary
  53                         register state information.
  54 
  55      EBUSY              The process handle P refers to a live process and it
  56                         is not stopped.
  57 
  58      ENOENT             The process handle P refers to a live process and
  59                         there is no thread with id lwpid or it is not a 64-bit
  60                         SPARCv9 process.
  61 
  62      EINVAL             The process handle P refers to a core file and there
  63                         is no thread with id lwpid.
  64 
  65 ARCHITECTURE
  66      The Plwp_getasrs() and Plwp_setasrs() functions are only available on
  67      64-bit SPARCv9 platforms.
  68 
  69 INTERFACE STABILITY
  70      Uncommitted
  71 
  72 MT-LEVEL
  73      See LOCKING in libproc(3LIB).
  74 
  75 SEE ALSO
  76      libproc(3LIB), Plwp_getfpregs(3PROC), Plwp_getregs(3PROC),
  77      Plwp_setregs(3PROC), Plwp_setregs(3PROC), Pstop(3PROC), proc(4)
  78 
  79 illumos                          May 11, 2016                          illumos