~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to docs/linux.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="ISO8859-1"?>
2
 
<!--  
3
 
 
4
 
   $Id: linux.xml,v 1.1 2004/10/22 20:45:36 michael Exp $ 
5
 
   This file is part of the FPC documentation. 
6
 
   Copyright (C) 1997, by Michael Van Canneyt 
7
 
 
8
 
   The FPC documentation is free text; you can redistribute it and/or 
9
 
   modify it under the terms of the GNU Library General Public License as 
10
 
   published by the Free Software Foundation; either version 2 of the 
11
 
   License, or (at your option) any later version. 
12
 
 
13
 
   The FPC Documentation is distributed in the hope that it will be useful, 
14
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of 
15
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
16
 
   Library General Public License for more details. 
17
 
 
18
 
   You should have received a copy of the GNU Library General Public 
19
 
   License along with the FPC documentation; see the file COPYING.LIB.  If not, 
20
 
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
21
 
   Boston, MA 02111-1307, USA. 
22
 
 -->
23
 
<fpdoc-descriptions>
24
 
<package name="rtl">
25
 
<module name="Linux">
26
 
<short>Linux-specific operating system calls.</short>
27
 
<descr>
28
 
<p>
29
 
The <file>linux</file> unit contains linux specific operating system calls.
30
 
</p>
31
 
<p>
32
 
The platform independent functionality of the FPC 1.0.X version of the 
33
 
<file>linux</file> unit has been split out over the 
34
 
<link id="#rtl.unix">unix</link>, <link id="#rtl.baseunix">baseunix</link> and
35
 
<link id="#rtl.unixutil">unixutil</link> units.
36
 
</p>
37
 
<p>
38
 
The X86-specific parts have been moved to the <link id="#rtl.x86">X86</link>
39
 
unit.
40
 
</p>
41
 
<p>
42
 
People wanting to use the old version (FPC 1.0.X and before) of the
43
 
<file>linux</file> can use the <link id="#rtl.oldlinux">oldlinux</link> unit
44
 
instead.
45
 
</p>
46
 
</descr>
47
 
 
48
 
<!-- record type Visibility: default -->
49
 
<element name="TSysinfo">
50
 
<short>Record with system information, used by the <link id="SysInfo"/> call.</short>
51
 
</element>
52
 
 
53
 
<!-- variable Visibility: default -->
54
 
<element name="TSysinfo.uptime">
55
 
<short>Number of seconds since boot.</short>
56
 
</element>
57
 
 
58
 
<!-- variable Visibility: default -->
59
 
<element name="TSysinfo.loads">
60
 
<short>1, 5 and 15 minute load averages.</short>
61
 
</element>
62
 
 
63
 
<!-- variable Visibility: default -->
64
 
<element name="TSysinfo.totalram">
65
 
<short>total amount of main memory.</short>
66
 
</element>
67
 
 
68
 
<!-- variable Visibility: default -->
69
 
<element name="TSysinfo.freeram">
70
 
<short>amount of free memory.</short>
71
 
</element>
72
 
 
73
 
<!-- variable Visibility: default -->
74
 
<element name="TSysinfo.sharedram">
75
 
<short>amount of shared memory.</short>
76
 
</element>
77
 
 
78
 
<!-- variable Visibility: default -->
79
 
<element name="TSysinfo.bufferram">
80
 
<short>amount of memory used by buffers.</short>
81
 
</element>
82
 
 
83
 
<!-- variable Visibility: default -->
84
 
<element name="TSysinfo.totalswap">
85
 
<short>total amount of swapspace.</short>
86
 
</element>
87
 
 
88
 
<!-- variable Visibility: default -->
89
 
<element name="TSysinfo.freeswap">
90
 
<short>amount of free swapspace.</short>
91
 
</element>
92
 
 
93
 
<!-- variable Visibility: default -->
94
 
<element name="TSysinfo.procs">
95
 
<short>number of current processes.</short>
96
 
</element>
97
 
 
98
 
<!-- variable Visibility: default -->
99
 
<element name="TSysinfo.s">
100
 
<short>?</short>
101
 
</element>
102
 
 
103
 
<!-- pointer type Visibility: default -->
104
 
<element name="PSysInfo">
105
 
<short>Pointer to <link id="TSysInfo"/> record.</short>
106
 
</element>
107
 
 
108
 
<!-- function Visibility: default -->
109
 
<element name="Sysinfo">
110
 
<short>Return kernel system information</short>
111
 
<descr>
112
 
<p>
113
 
<var>SysInfo</var> returns system information in <var>Info</var>. Returned information
114
 
in <var>Info</var> includes:
115
 
</p>
116
 
<dl>
117
 
<dt>uptime</dt><dd>Number of seconds since boot.</dd>
118
 
<dt>loads</dt><dd>1, 5 and 15 minute load averages.</dd>
119
 
<dt>totalram</dt><dd>total amount of main memory.</dd>
120
 
<dt>freeram</dt><dd>amount of free memory.</dd>
121
 
<dt>sharedram</dt><dd>amount of shared memory.</dd>
122
 
<dt>bufferram</dt><dd>amount of memory used by buffers.</dd>
123
 
<dt>totalswap</dt><dd>total amount of swapspace.</dd>
124
 
<dt>freeswap</dt><dd>amount of free swapspace.</dd>
125
 
<dt>procs</dt><dd>number of current processes.</dd>
126
 
</dl>
127
 
</descr>
128
 
<errors>
129
 
None.
130
 
</errors>
131
 
<seealso>
132
 
<link id="#rtl.baseunix.fpUname"/>
133
 
</seealso>
134
 
<example file="linuxex/ex64"/>
135
 
</element>
136
 
 
137
 
<!-- constant Visibility: default -->
138
 
<element name="CSIGNAL">
139
 
<short><link id="Clone"/> option: Signal mask to be sent at exit</short>
140
 
</element>
141
 
 
142
 
<!-- constant Visibility: default -->
143
 
<element name="CLONE_VM">
144
 
<short><link id="Clone"/> option: VM shared between processes</short>
145
 
</element>
146
 
 
147
 
<!-- constant Visibility: default -->
148
 
<element name="CLONE_FS">
149
 
<short><link id="Clone"/> option: fs info shared between processes</short>
150
 
</element>
151
 
 
152
 
<!-- constant Visibility: default -->
153
 
<element name="CLONE_FILES">
154
 
<short><link id="Clone"/> option: open files shared between processes</short>
155
 
</element>
156
 
 
157
 
<!-- constant Visibility: default -->
158
 
<element name="CLONE_SIGHAND">
159
 
<short><link id="Clone"/> option: signal handlers shared between processes</short>
160
 
</element>
161
 
 
162
 
<!-- constant Visibility: default -->
163
 
<element name="CLONE_PID">
164
 
<short><link id="Clone"/> option: PID shared between processes</short>
165
 
</element>
166
 
 
167
 
<!-- function type Visibility: default -->
168
 
<element name="TCloneFunc">
169
 
<short>Clone function prototype.</short>
170
 
</element>
171
 
 
172
 
<!-- function Visibility: default -->
173
 
<element name="Clone">
174
 
<short>Clone current process (create new thread)</short>
175
 
<descr>
176
 
<p>
177
 
<var>Clone</var>
178
 
creates a child process which is a copy of the parent process, just
179
 
like <link id="#rtl.baseunix.FpFork">FpFork</link> does. In difference with <var>Fork</var>, however, the child
180
 
process shares some parts of it's execution context with its parent, so it
181
 
is suitable for the implementation of threads: many instances of a program
182
 
that share the same memory.
183
 
</p>
184
 
<p>
185
 
When the child process is created, it starts executing the function
186
 
<var>Func</var>, and passes it <var>Args</var>. The return value of <var>Func</var> is 
187
 
either the explicit return value of the function, or the exit code of
188
 
the child process.
189
 
</p>
190
 
<p>
191
 
The <var>sp</var> pointer points to the memory reserved as stack space for the
192
 
child process. This address should be the top of the memory block to be used
193
 
as stack.
194
 
</p>
195
 
<p>
196
 
The <var>Flags</var> determine the behaviour of the <var>Clone</var> call. The low
197
 
byte of the Flags contains the number of the signal that will be  sent to 
198
 
the parent when  the child dies. 
199
 
This may be bitwise OR'ed with the following constants:
200
 
</p>
201
 
<dl>
202
 
<dt>CLONE_VM</dt>
203
 
<dd> Parent and child share the same memory space, including
204
 
memory (un)mapped with subsequent <var>mmap</var> calls.</dd>
205
 
<dt>CLONE_FS</dt>
206
 
<dd> Parent and child have the same view of the filesystem;
207
 
the <var>chroot</var>, <var>chdir</var> and <var>umask</var> calls affect both processes.</dd>
208
 
<dt>CLONE_FILES</dt>
209
 
<dd> the file descriptor table of parent and child is shared.</dd>
210
 
<dt>CLONE_SIGHAND</dt>
211
 
<dd> the parent and child share the same table of signal
212
 
handlers. The signal masks are different, though.</dd>
213
 
<dt>CLONE_PID</dt>
214
 
<dd> PArent and child have the same process ID.</dd>
215
 
</dl>
216
 
<p>
217
 
Clone returns the process ID in the parent process, and -1 if an error
218
 
occurred.
219
 
</p>
220
 
</descr>
221
 
<errors>
222
 
<p>
223
 
On error, -1 is returned to the parent, and no child is created.
224
 
</p>
225
 
<dl>
226
 
<dt>sys_eagain</dt><dd>Too many processes are running.</dd>
227
 
<dt>sys_enomem</dt><dd>Not enough memory to create child process.</dd>
228
 
</dl>
229
 
</errors>
230
 
<seealso>
231
 
<link id="#rtl.baseunix.FpFork"/>
232
 
</seealso>
233
 
<example file="linuxex/ex71"/>
234
 
</element>
235
 
</module> <!-- Linux -->
236
 
</package>
237
 
</fpdoc-descriptions>