'\"!  tbl | mmdoc
'\"macro stdmacro
.if n .pH g2.priocntlset @(#)priocntlset	40.11 of 11/30/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} priocntlset 2 "" "\&"
.if \nX=1 .ds x} priocntlset 2 ""
.if \nX=2 .ds x} priocntlset 2 "" "\&"
.if \nX=3 .ds x} priocntlset "" "" "\&"
.TH \*(x}
.SH NAME
\f4priocntlset\f1 \- generalized process scheduler control
.SH SYNOPSIS
.ft 4
.nf
#include <sys/types.h>
#include <sys/procset.h>
#include <sys/priocntl.h>
#include <sys/rtpriocntl.h>
#include <sys/tspriocntl.h>
.sp .5
long priocntlset(procset_t *psp, int cmd, \f1... /* arg */\fP);
.fi
.ft 1
.SH DESCRIPTION
\f4priocntlset\fP changes the scheduling properties of running processes.
\f4priocntlset\fP has the same functions as the \f4priocntl\fP system call,
but a more general way of specifying the set of processes whose
scheduling properties are to be changed.
.P
.I cmd
specifies the function to be performed.
.I arg
is a pointer to a structure whose type depends on
.IR cmd .
See
\f4priocntl\fP(2)
for the valid values of
.I cmd
and the corresponding
.I arg
structures.
.P
.I psp
is a pointer to a
\f4procset\f1
structure, which
\f4priocntlset\fP uses to specify the set
of processes whose scheduling properties are to be changed.
.P
.RS 2n
.ft 4
.nf
typedef struct procset {
  idop_t    p_op;       /* operator connecting left/right sets */
  idtype_t  p_lidtype;  /* left set ID type */
  id_t      p_lid;      /* left set ID */
  idtype_t  p_ridtype;  /* right set ID type */
  id_t      p_rid;      /* right set ID */
} procset_t;
.fi
.ft 1
.RE
.P
\f4p_lidtype\f1
and
\f4p_lid\f1
specify the \s-1ID\s0 type and \s-1ID\s0 of one (``left'') set of processes;
\f4p_ridtype\f1
and
\f4p_rid\f1
specify the \s-1ID\s0 type and \s-1ID\s0 of a second (``right'') set of processes.
\s-1ID\s0 types and \s-1ID\s0s are specified just as for the
\f4priocntl\fP
system call.
\f4p_op\f1
specifies the operation to be performed on the two sets of processes to get
the set of processes the system call is to apply to.
The valid values for
\f4p_op\f1
and the processes they specify are:
.RS 2n
.TP 14n
\f4POP_DIFF\f1
set difference: processes in left set and not in right set
.TP
\f4POP_AND\f1
set intersection: processes in both left and right sets
.TP
\f4POP_OR\f1
set union: processes in either left or right sets or both
.TP
\f4POP_XOR\f1
set exclusive-or: processes in left or right set but not in both
.RE
.P
The following macro, which is defined in
\f4procset.h\f1,
offers a convenient way to initialize a
\f4procset\f1
structure:
.P
.RS 2n
.nf
.ft 4
#define	setprocset(psp, op, ltype, lid, rtype, rid) \e
(psp)->p_op       = (op), \e
(psp)->p_lidtype  = (ltype), \e
(psp)->p_lid      = (lid), \e
(psp)->p_ridtype  = (rtype), \e
(psp)->p_rid      = (rid),
.ft 1
.fi
.RE
.SH "DIAGNOSTICS"
\f4priocntlset\fP
has the same return values and errors as
\f4priocntl\fP.
.SH "SEE ALSO"
\f4priocntl\fP(2)
.P
\f4priocntl\fP(1) in the \f2User's Reference Manual\f1 
