1
0
Files
irix-657m-src/eoe/man/man2/sched_getparam.2
2022-09-29 17:59:04 +03:00

59 lines
1.9 KiB
Groff

'\"macro stdmacro
.Op c p a
.TH sched_getparam 2
.SH NAME
\f4sched_getparam\fP \- get the scheduling parameters of a process
.SH C SYNOPSIS
.nf
\f3#include <sched.h>\f1
.sp .6v
\f4int sched_getparam (pid_t \f2pid\fP, const struct sched_param *\f2param\fP);\f1
.fi
.SH DESCRIPTION
The \f4sched_getparam\fP system call is used to get the scheduling
parameters for the process specified by \f2pid\fP. If \f2pid\fP is set to
zero, then the scheduling parameters of the calling process will be obtained.
.P
A process may obtain the scheduling parameters of itself and any process
sharing the same real user ID [see \f4getuid\fP(2)]. To obtain
the scheduling parameters of an unrelated process, the calling process must
have superuser permissions.
.P
The scheduling parameters of \f2pid\fP are returned via the parameter
structure at address \f2param\fP (see \f4sched_setparam\fP(2)).
.P
If \f2pid\fP refers to a POSIX thread process [see \f4pthreads\fP(3P)]
then this call retrieves the scheduling policy parameters
that are shared by process scope threads.
.P
\f4sched_getparam\fP will fail if one or more of the following are true:
.TP 15
[EINVAL]
The process specified by \f2pid\fP is not executing with a
scheduling policy.
.TP
[EFAULT]
The address specified by \f2param\fP is outside the range of the
address space of the calling process.
.TP
[EPERM]
The calling process attempted to obtain the scheduling parameters of an
unrelated process and the caller does not have superuser permissions.
.TP
[ESRCH]
The process specified by \f2pid\fP does not exist.
.SH SEE ALSO
sched_getscheduler(2),
sched_get_priority_max(2),
sched_get_priority_min(2),
sched_rr_get_interval(2),
sched_setparam(2),
sched_setscheduler(2),
sched_yield(2),
getuid(2),
pthreads(5)
.SH DIAGNOSTICS
Upon successful completion, a value of 0 is returned to the calling process.
Otherwise, a value of -1 is returned and \f4errno\fP is set to indicate
the error.