add directory Ref-docs

This commit is contained in:
gohigh
2024-02-19 00:21:47 -05:00
parent 5a46ddb732
commit ef50495c9d
2492 changed files with 1609142 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
<html><!-- This HTML file has been created by texi2html 1.29
from syscalls.texi on 4 June 1994 -->
<TITLE>Syscall specifications of Linux - getpriority</TITLE>
<P>Go to the <A HREF="syscalls_63.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_63.html">previous</A>, <A HREF="syscalls_65.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_65.html">next</A> section.<P>
<H2><A NAME="SEC64" HREF="syscalls_toc.html#SEC64" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC64">getpriority and setpriority</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int getpriority(int <VAR>which</VAR>, int <VAR>who</VAR>);</CODE>
<P>
<CODE>int setpriority(int <VAR>which</VAR>, int <VAR>who</VAR>, int <VAR>prio</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>which</VAR>: [in] which kind of taks to work on.
<P>
<VAR>who</VAR>: [in] who exactly we want to work on.
<P>
<VAR>prio</VAR>: [in] the new priority.
<P>
<H3>DESCRIPTION</H3>
<P>
<CODE>getpriority</CODE> retreives the highest priority of a task, a process
group or a user and <CODE>setpriority</CODE> sets the priority of a task, all
process in a process group or a user. <VAR>which</VAR> and have the
following values:
<P>
<DL COMPACT>
<DT><CODE>PRIO_PROCESS</CODE>
<DD>to get the priority of a process. In this case <VAR>who</VAR> is a process id.
<P>
<DT><CODE>PRIO_PGRP</CODE>
<DD>to get the priority of a process group. In this case <VAR>who</VAR> is a
process group id.
<P>
<DT><CODE>PRIO_USER</CODE>
<DD>to get the priority of a user. In this case <VAR>who</VAR> is a user id.
</DL>
<P>
In any case, a value of zero for <VAR>who</VAR> means the current process,
process group or user. <VAR>prio</VAR> is in the range [-20,20] with lower
values giving a higher scheduling priority.
<P>
<H3>RETURN VALUE</H3>
<P>
<VAR>getpriority</VAR> returns something between -20 and 20.
<VAR>setpriority</VAR> returns 0 on success and -1 on error. In case of
errorm, <CODE>errno</CODE> is set to one of the following values:
<P>
<UL>
<LI><CODE>EINVAL</CODE>: <VAR>which</VAR> has an invalid value.
<LI><CODE>EPERM</CODE>: the effective uid and gid of the calling task do not
match those of the target task.
<LI><CODE>EACCESS</CODE>: the caller tried to lower a priority but is not a
superuser task.
<LI><CODE>ESRCH</CODE>.
</UL>
<P>
<P>Go to the <A HREF="syscalls_63.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_63.html">previous</A>, <A HREF="syscalls_65.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_65.html">next</A> section.<P>