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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [posix-standard-support.html] - Blame information for rev 588

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>POSIX Standard Support</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="eCos POSIX compatibility layer"
23
HREF="posix-compatibility.html"><LINK
24
REL="PREVIOUS"
25
TITLE="eCos POSIX compatibility layer"
26
HREF="posix-compatibility.html"><LINK
27
REL="NEXT"
28
TITLE="Process Environment [POSIX Section 4]"
29
HREF="posix-process-environment.html"></HEAD
30
><BODY
31
CLASS="CHAPTER"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="posix-compatibility.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
></TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="posix-process-environment.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="CHAPTER"
82
><H1
83
><A
84
NAME="POSIX-STANDARD-SUPPORT">Chapter 31. POSIX Standard Support</H1
85
><DIV
86
CLASS="TOC"
87
><DL
88
><DT
89
><B
90
>Table of Contents</B
91
></DT
92
><DT
93
><A
94
HREF="posix-standard-support.html#POSIX-PROCESS-PRIMITIVES"
95
>Process Primitives &#0091;POSIX Section 3&#0093;</A
96
></DT
97
><DT
98
><A
99
HREF="posix-process-environment.html"
100
>Process Environment &#0091;POSIX Section 4&#0093;</A
101
></DT
102
><DT
103
><A
104
HREF="posix-files-and-directories.html"
105
>Files and Directories &#0091;POSIX Section 5&#0093;</A
106
></DT
107
><DT
108
><A
109
HREF="posix-input-and-output.html"
110
>Input and Output &#0091;POSIX Section 6&#0093;</A
111
></DT
112
><DT
113
><A
114
HREF="posix-device-and-class-specific-functions.html"
115
>Device and Class Specific Functions &#0091;POSIX Section 7&#0093;</A
116
></DT
117
><DT
118
><A
119
HREF="posix-c-language-services.html"
120
>C Language Services &#0091;POSIX Section 8&#0093;</A
121
></DT
122
><DT
123
><A
124
HREF="posix-system-databases.html"
125
>System Databases &#0091;POSIX Section 9&#0093;</A
126
></DT
127
><DT
128
><A
129
HREF="posix-data-interchange-format.html"
130
>Data Interchange Format &#0091;POSIX Section 10&#0093;</A
131
></DT
132
><DT
133
><A
134
HREF="posix-synchronization.html"
135
>Synchronization &#0091;POSIX Section 11&#0093;</A
136
></DT
137
><DT
138
><A
139
HREF="posix-memory-management.html"
140
>Memory Management &#0091;POSIX Section 12&#0093;</A
141
></DT
142
><DT
143
><A
144
HREF="posix-execution-scheduling.html"
145
>Execution Scheduling &#0091;POSIX Section 13&#0093;</A
146
></DT
147
><DT
148
><A
149
HREF="posix-clocks-and-timers.html"
150
>Clocks and Timers &#0091;POSIX Section 14&#0093;</A
151
></DT
152
><DT
153
><A
154
HREF="posix-message-passing.html"
155
>Message Passing &#0091;POSIX Section 15&#0093;</A
156
></DT
157
><DT
158
><A
159
HREF="posix-thread-management.html"
160
>Thread Management &#0091;POSIX Section 16&#0093;</A
161
></DT
162
><DT
163
><A
164
HREF="posix-thread-specific-data.html"
165
>Thread-Specific Data &#0091;POSIX Section 17&#0093;</A
166
></DT
167
><DT
168
><A
169
HREF="posix-thread-cancellation.html"
170
>Thread Cancellation &#0091;POSIX Section 18&#0093;</A
171
></DT
172
><DT
173
><A
174
HREF="posix-non-posix-functions.html"
175
>Non-POSIX Functions</A
176
></DT
177
></DL
178
></DIV
179
><P
180
>      eCos contains support for the POSIX Specification (ISO&#0047;IEC
181
      9945-1)&#0091;POSIX&#0093;.
182
    </P
183
><P
184
>      POSIX support is divided between the POSIX and the FILEIO
185
      packages. The POSIX package provides support for threads,
186
      signals, synchronization, timers and message queues. The FILEIO
187
      package provides support for file and device I&#0047;O. The two
188
      packages may be used together or separately, depending on
189
      configuration.
190
    </P
191
><P
192
>      This document takes a functional approach to the POSIX
193
      library. Support for a function implies that the data types and
194
      definitions necessary to support that function, and the objects
195
      it manipulates, are also defined. Any exceptions to this are
196
      noted, and unless otherwise noted, implemented functions behave
197
      as specified in the POSIX standard.
198
    </P
199
><P
200
>      This document only covers the differences between the eCos
201
      implementation and the standard; it does not provide complete
202
      documentation. For full information, see the POSIX standard
203
      &#0091;POSIX&#0093;. Online, the Open Group Single Unix
204
      Specification &#0091;SUS2&#0093; provides complete documentation
205
      of a superset of POSIX. If you have access to a Unix system with
206
      POSIX compatibility, then the manual pages for this will be of
207
      use.  There are also a number of books available.
208
      &#0091;Lewine&#0093; covers the process, signal, file and I&#0047;O
209
      functions, while &#0091;Lewis1&#0093;, &#0091;Lewis2&#0093;,
210
      &#0091;Nichols&#0093; and &#0091;Norton&#0093; cover Pthreads and
211
      related topics (see Bibliography, xref). However, many of these
212
      books are oriented toward using POSIX in non-embedded systems,
213
      so care should be taken in applying them to programming under
214
      eCos.
215
    </P
216
><P
217
>      The remainder of this chapter broadly follows the structure
218
      of the POSIX Specification. References to the appropriate
219
      section of the Standard are included.
220
    </P
221
><P
222
>      Omitted functions marked with &#8220;&#0047;&#0047; TBA&#8221;
223
      are potential candidates for later implementation.
224
    </P
225
><DIV
226
CLASS="SECT1"
227
><H1
228
CLASS="SECT1"
229
><A
230
NAME="POSIX-PROCESS-PRIMITIVES">Process Primitives &#0091;POSIX Section 3&#0093;</H1
231
><DIV
232
CLASS="SECT2"
233
><H2
234
CLASS="SECT2"
235
><A
236
NAME="AEN12979">Functions Implemented</H2
237
><TABLE
238
BORDER="5"
239
BGCOLOR="#E0E0F0"
240
WIDTH="70%"
241
><TR
242
><TD
243
><PRE
244
CLASS="SCREEN"
245
>int kill(pid&#0095;t pid, int sig);
246
int pthread&#0095;kill(pthread&#0095;t thread, int sig);
247
int sigaction(int sig, const struct sigaction &#0042;act,
248
              struct sigaction &#0042;oact);
249
int sigqueue(pid&#0095;t pid, int sig, const union sigval value);
250
int sigprocmask(int how, const sigset&#0095;t &#0042;set,
251
                sigset&#0095;t &#0042;oset);
252
int pthread&#0095;sigmask(int how, const sigset&#0095;t &#0042;set,
253
                    sigset&#0095;t &#0042;oset);
254
int sigpending(sigset&#0095;t &#0042;set);
255
int sigsuspend(const sigset&#0095;t &#0042;set);
256
int sigwait(const sigset&#0095;t &#0042;set, int &#0042;sig);
257
int sigwaitinfo(const sigset&#0095;t &#0042;set, siginfo&#0095;t &#0042;info);
258
int sigtimedwait(const sigset&#0095;t &#0042;set, siginfo&#0095;t &#0042;info,
259
                 const struct timespec &#0042;timeout);
260
int sigemptyset(sigset&#0095;t &#0042;set);
261
int sigfillset(sigset&#0095;t &#0042;set);
262
int sigaddset(sigset&#0095;t &#0042;set, int signo);
263
int sigdelset(sigset&#0095;t &#0042;set, int signo);
264
int sigismember(const sigset&#0095;t &#0042;set, int signo);
265
unsigned int alarm( unsigned int seconds );
266
int pause( void );
267
unsigned int sleep( unsigned int seconds );</PRE
268
></TD
269
></TR
270
></TABLE
271
></DIV
272
><DIV
273
CLASS="SECT2"
274
><H2
275
CLASS="SECT2"
276
><A
277
NAME="AEN12982">Functions Omitted</H2
278
><TABLE
279
BORDER="5"
280
BGCOLOR="#E0E0F0"
281
WIDTH="70%"
282
><TR
283
><TD
284
><PRE
285
CLASS="SCREEN"
286
>pid&#0095;t fork(void);
287
int execl( const char &#0042;path, const char &#0042;arg, ... );
288
int execv( const char &#0042;path, char &#0042;const argv&#0091;&#0093; );
289
int execle( const char &#0042;path, const char &#0042;arg, ... );
290
int execve( const char &#0042;path, char &#0042;const argv&#0091;&#0093;,
291
            char &#0042;const envp&#0091;&#0093; );
292
int execlp( const char &#0042;path, const char &#0042;arg, ... );
293
int execvp( const char &#0042;path, char &#0042;const argv&#0091;&#0093; );
294
int pthread&#0095;atfork( void(&#0042;prepare)(void),
295
                    void (&#0042;parent)(void),
296
                    void (&#0042;child)() );
297
pid&#0095;t wait( int &#0042;stat&#0095;loc );
298
pid&#0095;t waitpid( pid&#0095;t pid, int &#0042;stat&#0095;loc,
299
               int options );
300
void &#0095;exit( int status );</PRE
301
></TD
302
></TR
303
></TABLE
304
></DIV
305
><DIV
306
CLASS="SECT2"
307
><H2
308
CLASS="SECT2"
309
><A
310
NAME="AEN12985">Notes</H2
311
><P
312
></P
313
><UL
314
><LI
315
><P
316
>    Signal handling may be enabled or disabled with the
317
    CYGPKG&#0095;POSIX&#0095;SIGNALS option. Since signals are used
318
    by other POSIX components, such as timers, disabling signals will
319
    disable those components too.
320
    </P
321
></LI
322
><LI
323
><P
324
>    <SPAN
325
CLASS="emphasis"
326
><I
327
CLASS="EMPHASIS"
328
>kill()</I
329
></SPAN
330
> and
331
    <SPAN
332
CLASS="emphasis"
333
><I
334
CLASS="EMPHASIS"
335
>sigqueue()</I
336
></SPAN
337
> may only take a
338
    <SPAN
339
CLASS="strong"
340
><B
341
CLASS="EMPHASIS"
342
>pid</B
343
></SPAN
344
> argument of zero,
345
    which maps to the current process.
346
    </P
347
></LI
348
><LI
349
><P
350
>    The <SPAN
351
CLASS="emphasis"
352
><I
353
CLASS="EMPHASIS"
354
>SIGEV&#0095;THREAD</I
355
></SPAN
356
> notification type is
357
            not currently implemented.
358
    </P
359
></LI
360
><LI
361
><P
362
>    Job Control and Memory Protection signals are
363
            not supported.
364
    </P
365
></LI
366
><LI
367
><P
368
>    An extra implementation defined
369
    <SPAN
370
CLASS="emphasis"
371
><I
372
CLASS="EMPHASIS"
373
>si&#0095;code</I
374
></SPAN
375
> value,
376
    <SPAN
377
CLASS="emphasis"
378
><I
379
CLASS="EMPHASIS"
380
>SI&#0095;EXCEPT</I
381
></SPAN
382
>, is defined to
383
    distinguish hardware generated exceptions from
384
    others.
385
    </P
386
></LI
387
><LI
388
><P
389
>    Extra signals are defined:
390
    &#0095;SIGTRAP&#0095;,&#0095;SIGIOT&#0095;,
391
    &#0095;SIGEMT&#0095;, and &#0095;SIGSYS&#0095;. These are
392
    largely to maintain compatibility with the signal numbers used by
393
    GDB.
394
    </P
395
></LI
396
><LI
397
><P
398
>    Signal delivery may currently occur at unexpected places in some
399
    API functions. Using <SPAN
400
CLASS="emphasis"
401
><I
402
CLASS="EMPHASIS"
403
>longjmp()</I
404
></SPAN
405
> to transfer
406
    control out of a signal handler may result in the interrupted
407
    function not being able to complete properly. This may result in
408
    later function calls failing or deadlocking.
409
    </P
410
></LI
411
></UL
412
></DIV
413
></DIV
414
></DIV
415
><DIV
416
CLASS="NAVFOOTER"
417
><HR
418
ALIGN="LEFT"
419
WIDTH="100%"><TABLE
420
SUMMARY="Footer navigation table"
421
WIDTH="100%"
422
BORDER="0"
423
CELLPADDING="0"
424
CELLSPACING="0"
425
><TR
426
><TD
427
WIDTH="33%"
428
ALIGN="left"
429
VALIGN="top"
430
><A
431
HREF="posix-compatibility.html"
432
ACCESSKEY="P"
433
>Prev</A
434
></TD
435
><TD
436
WIDTH="34%"
437
ALIGN="center"
438
VALIGN="top"
439
><A
440
HREF="ecos-ref.html"
441
ACCESSKEY="H"
442
>Home</A
443
></TD
444
><TD
445
WIDTH="33%"
446
ALIGN="right"
447
VALIGN="top"
448
><A
449
HREF="posix-process-environment.html"
450
ACCESSKEY="N"
451
>Next</A
452
></TD
453
></TR
454
><TR
455
><TD
456
WIDTH="33%"
457
ALIGN="left"
458
VALIGN="top"
459
>eCos POSIX compatibility layer</TD
460
><TD
461
WIDTH="34%"
462
ALIGN="center"
463
VALIGN="top"
464
><A
465
HREF="posix-compatibility.html"
466
ACCESSKEY="U"
467
>Up</A
468
></TD
469
><TD
470
WIDTH="33%"
471
ALIGN="right"
472
VALIGN="top"
473
>Process Environment &#0091;POSIX Section 4&#0093;</TD
474
></TR
475
></TABLE
476
></DIV
477
></BODY
478
></HTML
479
>

powered by: WebSVN 2.1.0

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