OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rtems-20020807/] [doc/] [posix_users/] [process.t] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
@c
2
@c COPYRIGHT (c) 1988-2002.
3
@c On-Line Applications Research Corporation (OAR).
4
@c All rights reserved.
5
@c
6
@c process.t,v 1.6 2002/06/28 19:14:44 joel Exp
7
@c
8
 
9
@chapter Process Creation and Execution Manager
10
 
11
@section Introduction
12
 
13
The process creation and execution manager provides the
14
functionality associated with the creation and termination
15
of processes.
16
 
17
 
18
The directives provided by the process creation and execution manager are:
19
 
20
@itemize @bullet
21
@item @code{fork} - Create a Process
22
@item @code{execl} - Execute a File
23
@item @code{execv} - Execute a File
24
@item @code{execle} - Execute a File
25
@item @code{execve} - Execute a File
26
@item @code{execlp} - Execute a File
27
@item @code{execvp} - Execute a File
28
@item @code{pthread_atfork} - Register Fork Handlers
29
@item @code{wait} - Wait for Process Termination
30
@item @code{waitpid} - Wait for Process Termination
31
@item @code{_exit} - Terminate a Process
32
@end itemize
33
 
34
@section Background
35
 
36
POSIX process functionality can not be completely
37
supported by RTEMS.  This is because RTEMS provides no memory
38
protection and implements a @i{single process, multi-threaded
39
execution model}.  In this light, RTEMS provides none of the
40
routines that are associated with the creation of new processes.
41
However, since the entire RTEMS application (e.g. executable)
42
is logically a single POSIX process, RTEMS is able to provide
43
implementations of many operations on processes.  The rule of
44
thumb is that those routines provide a meaningful result.
45
For example, @code{getpid()} returns the node number.
46
 
47
@section Operations
48
 
49
The only functionality method defined by this manager which is
50
supported by RTEMS is the @code{_exit} service.  The
51
implementation of @code{_exit} shuts the application down and
52
is equivalent to invoking either @code{exit} or
53
@code{rtems_shutdown_executive}.
54
 
55
@section Directives
56
 
57
This section details the process creation and execution manager's directives.
58
A subsection is dedicated to each of this manager's directives
59
and describes the calling sequence, related constants, usage,
60
and status codes.
61
 
62
@c
63
@c
64
@c
65
@page
66
@subsection fork - Create a Process
67
 
68
@findex fork
69
@cindex  create a process
70
 
71
@subheading CALLING SEQUENCE:
72
 
73
@ifset is-C
74
@example
75
#include 
76
 
77
int fork( void );
78
@end example
79
@end ifset
80
 
81
@ifset is-Ada
82
@end ifset
83
 
84
@subheading STATUS CODES:
85
 
86
@table @b
87
@item ENOSYS
88
This routine is not supported by RTEMS.
89
 
90
@end table
91
 
92
@subheading DESCRIPTION:
93
 
94
This routine is not supported by RTEMS.
95
 
96
@subheading NOTES:
97
 
98
NONE
99
 
100
@c
101
@c
102
@c
103
@page
104
@subsection execl - Execute a File
105
 
106
@findex execl
107
@cindex  execute a file
108
 
109
@subheading CALLING SEQUENCE:
110
 
111
@ifset is-C
112
@example
113
int execl(
114
  const char *path,
115
  const char *arg,
116
  ...
117
);
118
@end example
119
@end ifset
120
 
121
@ifset is-Ada
122
@end ifset
123
 
124
@subheading STATUS CODES:
125
 
126
@table @b
127
@item ENOSYS
128
This routine is not supported by RTEMS.
129
 
130
@end table
131
 
132
@subheading DESCRIPTION:
133
 
134
This routine is not supported by RTEMS.
135
 
136
@subheading NOTES:
137
 
138
NONE
139
 
140
@c
141
@c
142
@c
143
@page
144
@subsection execv - Execute a File
145
 
146
@findex execv
147
@cindex  execute a file
148
 
149
@subheading CALLING SEQUENCE:
150
 
151
@ifset is-C
152
@example
153
int execv(
154
  const char *path,
155
  char const *argv[],
156
  ...
157
);
158
@end example
159
@end ifset
160
 
161
@ifset is-Ada
162
@end ifset
163
 
164
@subheading STATUS CODES:
165
 
166
@table @b
167
@item ENOSYS
168
This routine is not supported by RTEMS.
169
 
170
@end table
171
 
172
@subheading DESCRIPTION:
173
 
174
This routine is not supported by RTEMS.
175
 
176
@subheading NOTES:
177
 
178
NONE
179
 
180
@c
181
@c
182
@c
183
@page
184
@subsection execle - Execute a File
185
 
186
@findex execle
187
@cindex  execute a file
188
 
189
@subheading CALLING SEQUENCE:
190
 
191
@ifset is-C
192
@example
193
int execle(
194
  const char *path,
195
  const char *arg,
196
  ...
197
);
198
@end example
199
@end ifset
200
 
201
@ifset is-Ada
202
@end ifset
203
 
204
@subheading STATUS CODES:
205
 
206
@table @b
207
@item ENOSYS
208
This routine is not supported by RTEMS.
209
 
210
@end table
211
 
212
@subheading DESCRIPTION:
213
 
214
This routine is not supported by RTEMS.
215
 
216
@subheading NOTES:
217
 
218
NONE
219
 
220
@c
221
@c
222
@c
223
@page
224
@subsection execve - Execute a File
225
 
226
@findex execve
227
@cindex  execute a file
228
 
229
@subheading CALLING SEQUENCE:
230
 
231
@ifset is-C
232
@example
233
int execve(
234
  const char *path,
235
  char *const argv[],
236
  char *const envp[]
237
);
238
@end example
239
@end ifset
240
 
241
@ifset is-Ada
242
@end ifset
243
 
244
@subheading STATUS CODES:
245
 
246
@table @b
247
@item ENOSYS
248
This routine is not supported by RTEMS.
249
 
250
@end table
251
 
252
@subheading DESCRIPTION:
253
 
254
This routine is not supported by RTEMS.
255
 
256
@subheading NOTES:
257
 
258
NONE
259
 
260
@c
261
@c
262
@c
263
@page
264
@subsection execlp - Execute a File
265
 
266
@findex execlp
267
@cindex  execute a file
268
 
269
@subheading CALLING SEQUENCE:
270
 
271
@ifset is-C
272
@example
273
int execlp(
274
  const char *file,
275
  const char *arg,
276
  ...
277
);
278
@end example
279
@end ifset
280
 
281
@ifset is-Ada
282
@end ifset
283
 
284
@subheading STATUS CODES:
285
 
286
@table @b
287
@item ENOSYS
288
This routine is not supported by RTEMS.
289
 
290
@end table
291
 
292
@subheading DESCRIPTION:
293
 
294
This routine is not supported by RTEMS.
295
 
296
@subheading NOTES:
297
 
298
NONE
299
 
300
@c
301
@c
302
@c
303
@page
304
@subsection execvp - Execute a File
305
 
306
@findex execvp
307
@cindex  execute a file
308
 
309
@subheading CALLING SEQUENCE:
310
 
311
@ifset is-C
312
@example
313
int execvp(
314
  const char *file,
315
  char *const argv[]
316
  ...
317
);
318
@end example
319
@end ifset
320
 
321
@ifset is-Ada
322
@end ifset
323
 
324
@subheading STATUS CODES:
325
 
326
@table @b
327
@item ENOSYS
328
This routine is not supported by RTEMS.
329
 
330
@end table
331
 
332
@subheading DESCRIPTION:
333
 
334
This routine is not supported by RTEMS.
335
 
336
@subheading NOTES:
337
 
338
NONE
339
 
340
@c
341
@c
342
@c
343
@page
344
@subsection pthread_atfork - Register Fork Handlers
345
 
346
@findex pthread_atfork
347
@cindex  register fork handlers
348
 
349
@subheading CALLING SEQUENCE:
350
 
351
@ifset is-C
352
@example
353
#include 
354
 
355
int pthread_atfork(
356
  void (*prepare)(void),
357
  void (*parent)(void),
358
  void (*child)(void)
359
);
360
@end example
361
@end ifset
362
 
363
@ifset is-Ada
364
@end ifset
365
 
366
@subheading STATUS CODES:
367
 
368
@table @b
369
@item ENOSYS
370
This routine is not supported by RTEMS.
371
 
372
@end table
373
 
374
@subheading DESCRIPTION:
375
 
376
This routine is not supported by RTEMS.
377
 
378
@subheading NOTES:
379
 
380
NONE
381
 
382
@c
383
@c
384
@c
385
@page
386
@subsection wait - Wait for Process Termination
387
 
388
@findex wait
389
@cindex  wait for process termination
390
 
391
@subheading CALLING SEQUENCE:
392
 
393
@ifset is-C
394
@example
395
#include 
396
#include 
397
 
398
int wait(
399
  int *stat_loc
400
);
401
@end example
402
@end ifset
403
 
404
@ifset is-Ada
405
@end ifset
406
 
407
@subheading STATUS CODES:
408
 
409
@table @b
410
@item ENOSYS
411
This routine is not supported by RTEMS.
412
 
413
@end table
414
 
415
@subheading DESCRIPTION:
416
 
417
This routine is not supported by RTEMS.
418
 
419
@subheading NOTES:
420
 
421
NONE
422
 
423
@c
424
@c
425
@c
426
@page
427
@subsection waitpid - Wait for Process Termination
428
 
429
@findex waitpid
430
@cindex  wait for process termination
431
 
432
@subheading CALLING SEQUENCE:
433
 
434
@ifset is-C
435
@example
436
int wait(
437
  pid_t  pid,
438
  int   *stat_loc,
439
  int    options
440
);
441
@end example
442
@end ifset
443
 
444
@ifset is-Ada
445
@end ifset
446
 
447
@subheading STATUS CODES:
448
 
449
@table @b
450
@item ENOSYS
451
This routine is not supported by RTEMS.
452
 
453
@end table
454
 
455
@subheading DESCRIPTION:
456
 
457
This routine is not supported by RTEMS.
458
 
459
@subheading NOTES:
460
 
461
NONE
462
 
463
@c
464
@c
465
@c
466
@page
467
@subsection _exit - Terminate a Process
468
 
469
@findex _exit
470
@cindex  terminate a process
471
 
472
@subheading CALLING SEQUENCE:
473
 
474
@ifset is-C
475
@example
476
void _exit(
477
  int status
478
);
479
@end example
480
@end ifset
481
 
482
@ifset is-Ada
483
@end ifset
484
 
485
@subheading STATUS CODES:
486
 
487
NONE
488
 
489
@subheading DESCRIPTION:
490
 
491
The @code{_exit()} function terminates the calling process.
492
 
493
@subheading NOTES:
494
 
495
In RTEMS, a process is equivalent to the entire application on a single
496
processor. Invoking this service terminates the application.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.