1priocntlset(2)                   System Calls                   priocntlset(2)
2
3
4

NAME

6       priocntlset - generalized process scheduler control
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <sys/procset.h>
11       #include <sys/priocntl.h>
12       #include <sys/rtpriocntl.h>
13       #include <sys/tspriocntl.h>
14       #include <sys/iapriocntl.h>
15       #include <sys/fsspriocntl.h>
16       #include <sys/fxpriocntl.h>
17
18       long priocntlset(procset_t *psp, int cmd, /* arg */ ...);
19
20

DESCRIPTION

22       The priocntlset() function changes the scheduling properties of running
23       processes. priocntlset() has the same functions as the priocntl() func‐
24       tion,  but  a more general way of specifying the set of processes whose
25       scheduling properties are to be changed.
26
27
28       cmd specifies the function to be performed.  arg  is  a  pointer  to  a
29       structure whose type depends on cmd. See priocntl(2) for the valid val‐
30       ues of cmd and the corresponding arg structures.
31
32
33       psp is a pointer to a procset structure, which  priocntlset()  uses  to
34       specify  the  set  of  processes  whose scheduling properties are to be
35       changed. The procset structure contains the following members:
36
37         idop_t    p_op;        /* operator connecting left/right sets */
38         idtype_t  p_lidtype;   /* left set ID type */
39         id_t      p_lid;       /* left set ID */
40         idtype_t  p_ridtype;   /* right set ID type */
41         id_t      p_rid;       /* right set ID */
42
43
44
45       The p_lidtype and p_lid members specify the  ID  type  and  ID  of  one
46       ("left")  set of processes; the p_ridtype and p_rid members specify the
47       ID type and ID of a second ("right") set of processes. ID types and IDs
48       are  specified  just  as  for  the priocntl() function. The p_op member
49       specifies the operation to be performed on the two sets of processes to
50       get  the set of processes the function is to apply to. The valid values
51       for p_op and the processes they specify are:
52
53       POP_DIFF    Set difference: processes in left set and not in right set.
54
55
56       POP_AND     Set intersection: processes in both left and right sets.
57
58
59       POP_OR      Set union: processes in either left or right sets or both.
60
61
62       POP_XOR     Set exclusive-or: processes in left or right set but not in
63                   both.
64
65
66
67       The  following  macro, which is defined in <procset.h>, offers a conve‐
68       nient way to initialize a procset structure:
69
70         #define  setprocset(psp, op, ltype, lid, rtype, rid) \
71         (psp)->p_op       = (op), \
72         (psp)->p_lidtype  = (ltype), \
73         (psp)->p_lid      = (lid), \
74         (psp)->p_ridtype  = (rtype), \
75         (psp)->p_rid      = (rid),
76
77

RETURN VALUES

79       Unless otherwise noted above, priocntlset() returns 0 on success.  Oth‐
80       erwise, it returns −1 and sets errno to indicate the error.
81

ERRORS

83       The priocntlset() function will fail if:
84
85       EAGAIN    An attempt to change the class of a process failed because of
86                 insufficient resources other than memory (for example, class-
87                 specific kernel data structures).
88
89
90       EFAULT    One of the arguments points to an illegal address.
91
92
93       EINVAL    The  argument  cmd  was  invalid,  an invalid or unconfigured
94                 class was specified, or one of the parameters  specified  was
95                 invalid.
96
97
98       ENOMEM    An attempt to change the class of a process failed because of
99                 insufficient memory.
100
101
102       EPERM     The {PRIV_PROC_PRIOCNTL} privilege is  not  asserted  in  the
103                 effective set of the calling LWP.
104
105                 The calling LWP does not have sufficient privileges to affect
106                 the target LWP.
107
108
109       ERANGE    The requested time quantum is out of range.
110
111
112       ESRCH     None of the specified processes exist.
113
114

SEE ALSO

116       priocntl(1), priocntl(2)
117
118
119
120SunOS 5.11                        1 Apr 2008                    priocntlset(2)
Impressum