add directory Ref-docs
This commit is contained in:
76
Ref-docs/syscalls/syscalls_87.html
Normal file
76
Ref-docs/syscalls/syscalls_87.html
Normal file
@@ -0,0 +1,76 @@
|
||||
<html><!-- This HTML file has been created by texi2html 1.29
|
||||
from syscalls.texi on 4 June 1994 -->
|
||||
|
||||
<TITLE>Syscall specifications of Linux - getitimer</TITLE>
|
||||
<P>Go to the <A HREF="syscalls_86.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_86.html">previous</A>, <A HREF="syscalls_88.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_88.html">next</A> section.<P>
|
||||
<H2><A NAME="SEC87" HREF="syscalls_toc.html#SEC87" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC87">getitimer and setitimer</A></H2>
|
||||
<P>
|
||||
<H3>SYNOPSIS</H3>
|
||||
<P>
|
||||
<CODE>int getitimer(int <VAR>which</VAR>, struct itimerval *<VAR>value</VAR>);</CODE>
|
||||
<P>
|
||||
<CODE>int setitimer(int <VAR>which</VAR>, const struct itimerval *<VAR>value</VAR>,
|
||||
struct itimerval *<VAR>ovalue</VAR>);</CODE>
|
||||
<P>
|
||||
<H3>PARAMETERS</H3>
|
||||
<P>
|
||||
<VAR>which</VAR>: [in] the timer to access.
|
||||
<P>
|
||||
<VAR>value</VAR>: (For <CODE>getitimer</CODE>) [out] the value of the timer. (For
|
||||
<CODE>setitimer</CODE>) [in] the new value of the timer.
|
||||
<P>
|
||||
<VAR>ovalue</VAR>: [out] the old value of the timer.
|
||||
<P>
|
||||
<H3>DESCRIPTION</H3>
|
||||
<P>
|
||||
Each task posess 3 interval timers:
|
||||
<P>
|
||||
<DL COMPACT>
|
||||
<DT><CODE>ITIMER_REAL</CODE>
|
||||
<DD>Real time timer. It delivers <CODE>SIGALRM</CODE> upon expiration.
|
||||
<P>
|
||||
<DT><CODE>ITIMER_VIRTUAL</CODE>
|
||||
<DD>Runs only during the time the task is actually running on the processor.
|
||||
It delivers <CODE>SIGVTALRM</CODE> upon expiration.
|
||||
<P>
|
||||
<DT><CODE>ITIMER_PROF</CODE>
|
||||
<DD>Runs only during the time the taks is actually running on the processor
|
||||
or during the operating system is running on behalf of the task. It
|
||||
delivers <CODE>SIGPROF</CODE> upon expiration.
|
||||
</DL>
|
||||
<P>
|
||||
The structure <CODE>itimerval</CODE> has the following structure:
|
||||
<P>
|
||||
<PRE>
|
||||
struct itimerval {
|
||||
struct timeval it_interval; /* timer interval */
|
||||
struct timeval it_value; /* current value */
|
||||
};
|
||||
</PRE>
|
||||
<P>
|
||||
<PRE>
|
||||
struct timeval {
|
||||
long tv_sec; /* seconds */
|
||||
long tv_usec; /* microseconds */
|
||||
};
|
||||
</PRE>
|
||||
<P>
|
||||
<CODE>getitimer</CODE> gets those values for a specific timer and
|
||||
<CODE>setitimer</CODE> sets those values for a specific timer (and also
|
||||
retrieve the old values). If <CODE>it_value</CODE> or <CODE>it_interval</CODE> is
|
||||
set to 0 the timer is deactivated. The timers always expire at or after
|
||||
the requested time. If the requesting process is active at the moment of
|
||||
expiration a signal is immediately delivered otherwise the delivery may
|
||||
be delayed.
|
||||
<P>
|
||||
<H3>RETURN VALUE</H3>
|
||||
<P>
|
||||
On success zero is returned. On error -1 is returned and <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>EFAULT</CODE>.
|
||||
</UL>
|
||||
<P>
|
||||
<P>Go to the <A HREF="syscalls_86.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_86.html">previous</A>, <A HREF="syscalls_88.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_88.html">next</A> section.<P>
|
||||
Reference in New Issue
Block a user