svcadm(1M)을 검색하려면 섹션에서 1M 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
procset.h(3head)
procset.h(3HEAD) Headers procset.h(3HEAD)
NAME
procset.h - procset structure and macros
SYNOPSIS
#include <sys/procset.h>
DESCRIPTION
The procset structure offers an extensive and flexible way of identify‐
ing sets of processes or LWP(s) upon which some later operation should
be performed. This is accomplished by specifying two types of identi‐
fiers and a logic operator to be applied on them. The structure con‐
tains the following fields:
idop_t p_op; /* Operator connecting left/right sets */
idtype_t p_lidtype; /* Type of the left operand. */
id_t p_lid; /* Id of the left operand. */
idtype_t p_ridtype; /* Type of the right operand. */
id_t p_rid; /* Id of the right operand. */
The p_lidtype and p_lid members specify the ID type and ID of the left
set of processes, while the p_ridtype and p_rid members specify the ID
type and ID of the right set. The following ID types can be used:
P_PID process identifier
P_PPID parent process identifier
P_PGID process group (job control group) identifier
P_SID session identifier
P_CID scheduling class identifier
P_UID user identifier
P_GID group identifier
P_ALL all processes
P_LWPID LWP identifier
P_TASKID task identifier
P_PROJID project identifier
P_POOLID pool identifier
P_ZONEID zone identifier
P_CTID process contract identifier
P_CPUID CPU identifier
P_PSETID processor set identifier
The P_MYID identifier can be used in conjunction with any of the above
ID types to indicate that the desired ID is that of the calling LWP for
the given type. For example, P_PID and P_MYID result in the process
identifier of the caller LWP.
The p_op field specifies the logic operation to be performed on the
left and right sets. The valid values for p_op are:
POP_DIFF Difference: processes in the left set and not in the right
set.
POP_AND Intersection: processes in both left and right sets.
POP_OR Union: processes in either left or right sets.
POP_XOR Exclusive or: processes in left or right set, but not in
both.
The following macro, defined in procset.h, offers a convenient way to
initialize a procset structure:
#define setprocset(ps, op, ltype, lid, rtype, rid) \
(psp)->p_op = (op); \
(psp)->p_lidtype = (ltype); \
(psp)->p_lid = (lid); \
(psp)->p_ridtype = (rtype); \
(psp)->p_rid = (rid);
EXAMPLES
Example 1 Specifying All LWPs in the Current Process
#include <procset.h>
procset_t ps;
setprocset(&PS, POP_AND, P_PID, P_MYID, P_ALL, 0);
Example 2 Specifying the Current LWP in the Current Process
#include <thread.h>
#include <procset.h>
procset_t ps;
setprocset(&PS, POP_AND, P_PID, P_MYID, P_LWPID, thr_self());
Example 3 Specifying All LWPs of the Calling User
#include <thread.h>
#include <procset.h>
procset_t ps;
setprocset(&PS, POP_AND, P_UID, P_MYID, P_ALL, 0);
Example 4 Specifying All of User 323's Processes That are Running
Inside Zone 7
#include <thread.h>
#include <procset.h>
procset_t ps;
setprocset(&PS, POP_AND, P_UID, 323, P_ZONEID, 7);
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ StandardSee stan‐
dards(7).
Oracle Solaris 11.4 22 Feb 2021 procset.h(3HEAD)