svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 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:
tab(); lw(1.1i) lw(4.4i) P_PIDprocess identifier P_PPIDparent process
identifier P_PGIDT{ process group (job control group) identifier T}
P_SIDsession identifier P_CIDscheduling class identifier P_UIDuser
identifier P_GIDgroup identifier P_ALLall processes P_LWPIDLWP identi‐
fier P_TASKIDtask identifier P_PROJIDproject identifier P_POOLIDpool
identifier P_ZONEIDzone identifier P_CTIDprocess contract identifier
P_CPUIDCPU identifier P_PSETIDprocessor 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 <sys/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 <sys/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 <sys/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 In‐
side Zone 7
#include <thread.h>
#include <sys/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).
SEE ALSO
priocntlset(2), processor_affinity(2), sigsendset(2)
HISTORY
P_CPUID, P_CTID, P_POOLID, P_PSETID, and P_ZONEID were added in Solaris
10 3/05.
P_PROJID and P_TASKID were added in Solaris 9.
The <procset.h> header file was first included in the Solaris 2.0 re‐
lease.
Oracle Solaris 11.4 30 Aug 2024 procset.h(3HEAD)