~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to win32/3rdparty/pthreads/manual/sched_getscheduler.html

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
Import upstream version 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
 
<HTML>
3
 
<HEAD>
4
 
        <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
5
 
        <TITLE>&quot;SCHED_GETSCHEDULER&quot;(P) manual page</TITLE>
6
 
        <META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.3  (Linux)">
7
 
        <META NAME="CREATED" CONTENT="20050505;13153500">
8
 
        <META NAME="CHANGED" CONTENT="20050505;13202000">
9
 
        <!-- manual page source format generated by PolyglotMan v3.2, -->
10
 
        <!-- available at http://polyglotman.sourceforge.net/ -->
11
 
</HEAD>
12
 
<BODY LANG="en-GB" BGCOLOR="#ffffff" DIR="LTR">
13
 
<H4>POSIX Threads for Windows – REFERENCE - <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A></H4>
14
 
<P><A HREF="index.html">Reference Index</A></P>
15
 
<P><A HREF="#toc">Table of Contents</A></P>
16
 
<H2><A HREF="#toc0" NAME="sect0">Name</A></H2>
17
 
<P>sched_getscheduler - get scheduling policy (<B>REALTIME</B>) 
18
 
</P>
19
 
<H2><A HREF="#toc1" NAME="sect1">Synopsis</A></H2>
20
 
<P><B>#include &lt;sched.h&gt; </B>
21
 
</P>
22
 
<P><B>int sched_getscheduler(pid_t</B> <I>pid</I><B>); </B>
23
 
</P>
24
 
<H2><A HREF="#toc2" NAME="sect2">Description</A></H2>
25
 
<P>The <B>sched_getscheduler</B> function shall return the scheduling
26
 
policy of the process specified by <I>pid</I>. If the value of <I>pid</I>
27
 
is negative, the behavior of the <B>sched_getscheduler</B> function
28
 
is unspecified. 
29
 
</P>
30
 
<P>The values that can be returned by <B>sched_getscheduler</B> are
31
 
defined in the <I>&lt;sched.h&gt;</I> header. 
32
 
</P>
33
 
<P><B>Pthreads-w32</B> only supports the <B>SCHED_OTHER</B> policy,
34
 
which is the only value that can be returned. However, checks on <I>pid</I>
35
 
and permissions are performed first so that the other useful side
36
 
effects of this routine are retained.</P>
37
 
<P>If a process specified by <I>pid</I> exists, and if the calling
38
 
process has permission, the scheduling policy shall be returned for
39
 
the process whose process ID is equal to <I>pid</I>. 
40
 
</P>
41
 
<P>If <I>pid</I> is zero, the scheduling policy shall be returned for
42
 
the calling process. 
43
 
</P>
44
 
<H2><A HREF="#toc3" NAME="sect3">Return Value</A></H2>
45
 
<P>Upon successful completion, the <B>sched_getscheduler</B> function
46
 
shall return the scheduling policy of the specified process. If
47
 
unsuccessful, the function shall return -1 and set <I>errno</I> to
48
 
indicate the error. 
49
 
</P>
50
 
<H2><A HREF="#toc4" NAME="sect4">Errors</A></H2>
51
 
<P>The <B>sched_getscheduler</B> function shall fail if: 
52
 
</P>
53
 
<DL>
54
 
        <DT><B>EPERM</B> 
55
 
        </DT><DD>
56
 
        The requesting process does not have permission to determine the
57
 
        scheduling policy of the specified process. 
58
 
        </DD><DT>
59
 
        <B>ESRCH</B> 
60
 
        </DT><DD STYLE="margin-bottom: 0.5cm">
61
 
        No process can be found corresponding to that specified by <I>pid</I>.
62
 
                </DD></DL>
63
 
<P>
64
 
<I>The following sections are informative.</I> 
65
 
</P>
66
 
<H2><A HREF="#toc5" NAME="sect5">Examples</A></H2>
67
 
<P>None. 
68
 
</P>
69
 
<H2><A HREF="#toc6" NAME="sect6">Application Usage</A></H2>
70
 
<P>None. 
71
 
</P>
72
 
<H2><A HREF="#toc7" NAME="sect7">Rationale</A></H2>
73
 
<P>None. 
74
 
</P>
75
 
<H2><A HREF="#toc8" NAME="sect8">Future Directions</A></H2>
76
 
<P>None. 
77
 
</P>
78
 
<H2><A HREF="#toc9" NAME="sect9">See Also</A></H2>
79
 
<P><A HREF="sched_setscheduler.html"><B>sched_setscheduler</B>(3)</A>
80
 
, the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001,
81
 
<I>&lt;sched.h&gt;</I> 
82
 
</P>
83
 
<H2><A HREF="#toc10" NAME="sect10">Copyright</A></H2>
84
 
<P>Portions of this text are reprinted and reproduced in electronic
85
 
form from IEEE Std 1003.1, 2003 Edition, Standard for Information
86
 
Technology -- Portable Operating System Interface (POSIX), The Open
87
 
Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the
88
 
Institute of Electrical and Electronics Engineers, Inc and The Open
89
 
Group. In the event of any discrepancy between this version and the
90
 
original IEEE and The Open Group Standard, the original IEEE and The
91
 
Open Group Standard is the referee document. The original Standard
92
 
can be obtained online at <A HREF="http://www.opengroup.org/unix/online.html">http://www.opengroup.org/unix/online.html</A>
93
 
94
 
</P>
95
 
<P>Modified by Ross Johnson for use with <A HREF="http://sources.redhat.com/pthreads-win32">Pthreads-w32</A>.</P>
96
 
<HR>
97
 
<P><A NAME="toc"></A><B>Table of Contents</B></P>
98
 
<UL>
99
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect0" NAME="toc0">Name</A>
100
 
                </P>
101
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect1" NAME="toc1">Synopsis</A>
102
 
                </P>
103
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect2" NAME="toc2">Description</A>
104
 
                </P>
105
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect3" NAME="toc3">Return
106
 
        Value</A> 
107
 
        </P>
108
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect4" NAME="toc4">Errors</A>
109
 
                </P>
110
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect5" NAME="toc5">Examples</A>
111
 
                </P>
112
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect6" NAME="toc6">Application
113
 
        Usage</A> 
114
 
        </P>
115
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect7" NAME="toc7">Rationale</A>
116
 
                </P>
117
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect8" NAME="toc8">Future
118
 
        Directions</A> 
119
 
        </P>
120
 
        <LI><P STYLE="margin-bottom: 0cm"><A HREF="#sect9" NAME="toc9">See
121
 
        Also</A> 
122
 
        </P>
123
 
        <LI><P><A HREF="#sect10" NAME="toc10">Copyright</A> 
124
 
        </P>
125
 
</UL>
126
 
</BODY>
127
 
</HTML>