Information technology — Portable Operating System Interface (POSIX) — Part 1: System Application Program Interface (API) [C Language]

Is part of the POSIX series of standards for applications and user interfaces to open systems. It defines the applications interface to basic system services for input/output, file system access, and process management.

Technologies de l'information — Interface pour la portabilité des systèmes (POSIX) — Partie 1: Interface programme de systèmes d'application (API) [Langage C]

General Information

Status
Withdrawn
Publication Date
27-Nov-1996
Withdrawal Date
27-Nov-1996
Current Stage
9599 - Withdrawal of International Standard
Completion Date
13-Dec-2002
Ref Project

Relations

Buy Standard

Standard
ISO/IEC 9945-1:1996 - Information technology -- Portable Operating System Interface (POSIX)
English language
743 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

INTERNATIONAL
ISO/IEC
STANDARD
9945-l
ANSI/IEEE
Std 1003.1
Second edition
1996-07-12
Information technology - Portable
Operating System Interface (POSlX@) -
Part 1:
System Application Program Interface (API)
[C Language]
Technologies de /‘information - Interface pour la portabilit6 des syst&mes
(POSIX@) -
Partie 7: Interface programme de systemes d’application (API) [Langage C]
Reference number
ISO/I EC 9945-l : 1996(E)
ANSI/IEEE
Std 1003.1, 1996 Edition

---------------------- Page: 1 ----------------------
This page intentionally left blank

---------------------- Page: 2 ----------------------
International Standard ISO/IEC 9945-l: 1996 (E)
IEEE Std 1003.1,1996 Edition
(Incorporating ANSI/IEEE Stds 1003.1-1990, 1003.113-1993,
1003.1c-1995, and 1003.li-1995)
Information technology-
Portable Operating System
Interface (POSIX@)-Part 1:
System Application Program
Interface (API) [C Language]
Sponsor
Portable Applications Standards Committee
of the
IEEE Computer Society
*g-e
b 8
Adopted as an International Standard by the
*-Jr,
International Organization for Standardization
H
and by the
International Electrotechnical Commission
w
- American National Standard
Published by
The Institute of Electrical and Electronics Engineers, Inc.

---------------------- Page: 3 ----------------------
Abstract: This standard is part of the POSIX series of standards for applications
and user interfaces to open systems. It defines the applications interface to basic sys-
tem services for input/output, file system access, and process management. It also
defines a format for data interchange. When options specified in the Realtime Exten-
sion are included, the standard also defines interfaces appropriate for realtime appli-
cations. When options specified in the Threads Extension are included, the standard
also defines interfaces appropriate for multithreaded applications. This standard is
stated in terms of its C language binding.
Keywords: API, application portability, C (programming language), data processing,
information interchange, open systems, operating system, portable application,
POSIX, programming language, realtime, system configuration computer interface,
threads
POSIX is a registered trademark of the Institute of Electrical and Electronics Engineers, Inc.
Quote in 8.1.2.3 on Returns is taken from ANSI X3.159-1989, developed under the auspices of the Amer-
ican National Standards Accredited Committee X3 Technical Committee X3Jll.
The Institute of Electrical and Electronics Engineers, Inc.
345 East 47th Street, New York, NY 10017-2394, USA
Copyright 0 1996 by the
Institute of Electrical and Electronics Engineers, Inc.
All rights reserved. Published 1996.
Printed in the United States ofAmerica,
ISBN l-55937-573-6
No part of this publication may be reproduced in any form,
in an electronic retrieval system or otherwise,
without the prior written permission of the publisher.
12 July 1996
SH94352

---------------------- Page: 4 ----------------------
IEEE Standards documents are developed within the Technical Committees of the
IEEE Societies and the Standards Coordinating Committees of the IEEE Standards
Board. Members of the committees serve voluntarily and without compensation. They
are not necessarily members of the Institute. The standards developed within IEEE
represent a consensus of the broad expertise on the subject within the Institute as
well as those activities outside of IEEE that have expressed an interest in participat-
ing in the development of the standard.
Use of an IEEE Standard is wholly voluntary. The existence of an IEEE Standard
does not imply that there are no other ways to produce, test, measure, purchase, mar-
ket, or provide other goods and services related to the scope of the IEEE Standard.
Furthermore, the viewpoint expressed at the time a standard is approved and issued
is subject to change brought about through developments in the state of the art and
comments received from users of the standard. Every IEEE Standard is subjected to
review at least every five years for revision or reaffirmation. When a document is
more than five years old and has not been reaffirmed, it is reasonable to conclude that
its contents, although still of some value, do not wholly reflect the present state of the
art. Users are cautioned to check to determine that they have the latest edition of any
IEEE Standard.
Comments for revision of IEEE Standards are welcome from any interested party,
regardless of membership affiliation with IEEE. Suggestions for changes in docu-
ments should be in the form of a proposed change of text, together with appropriate
supporting comments.
Interpretations: Occasionally questions may arise regarding the meaning of portions
of standards as they relate to specific applications. When the need for interpretations
is brought to the attention of IEEE, the Institute will initiate action to prepare appro-
priate responses. Since IEEE Standards represent a consensus of all concerned inter-
ests, it is important to ensure that any interpretation has also received the
concurrence of a balance of interests. For this reason IEEE and the members of its
technical committees are not able to provide an instant response to interpretation
requests except in those cases where the matter has previously received formal con-
sideration.
Comments on standards and requests for interpretations should be addressed to:
Secretary, IEEE Standards Board
445 Hoes Lane
P.O. Box 1331
Piscataway, NJ 08855433 1
USA
Note: Attention is called to the possibility that implementation of this standard
may require use of subject matter covered by patent rights. By publication of this
standard, no position is taken with respect to the existence or validity of any
patent rights in connection therewith. The IEEE shall not be responsible for iden-
tifying all patents for which a license may be required by an IEEE standard or for
conducting inquiries into the legal validity or scope of those patents that are
brought to its attention.
Authorization to photocopy portions of any individual standard for internal or personal use is
granted by the Institute of Electrical and Electronics Engineers, Inc., provided that the appro-
priate fee is paid to Copyright Clearance Center. To arrange for payment of licensing fee, please
contact Copyright Clearance Center, Customer Service, 222 Rosewood Drive, Danvers, MA
01923 USA; (508) 750-8400. Permission to photocopy portions of any individual standard for
educational classroom use can also be obtained through the Copyright Clearance Center.

---------------------- Page: 5 ----------------------
Contents
PAGE
xi
Foreword . . . . . . . . . . . . . . . . . . . . . . .
xii
Introduction . . . . . . . . . . . . . . . . . . . . . .
xii
Organization of This Part ofISO/IEC 9945 . . . . . . . . . . .
xl11 l ‘*
Base Documents . . . . . . . . . . . . . . . . . . .
xl11 ‘**
Background . . . . . . . . . . . . . . . . . . . . .
Audience l l l l l l l l l l l l l l l l l l l l l l xiv
l Xiv
l l l l l l l l l l l l l l
Purpose
Related Standard’s Activities’ l l l l l l l l l l l l l l l xix
Sectionl~Generaleeeeeeeeeeeeeeeeeeee 1
1
l l l l l l l l l l l l l l l l
1.1 Scope
3
1.2 Normatiie kef’erekces l l l l l l l l l l l l l l l
3
1.3 Conformance l l l l l l l l l l l l l l l l l l l
11
Section 2: Terminology and General Requirements l l l l l l l l
11
2.1 Conventions l l l l l l l l l l l l l l l l l l l
l l l l l l l l l l l l l l l l l 12
2.2 Definitions
30
2.3 General Concepts l l l l l l l l l l l l l l l l l
33
2.4 ErrorNumbers l l l l l l l l l l l l l l l l l l
37
2.5 Primitive System Data Types l l l l l l l l l l l l l
38
2.6 Environment Description l l l l l l l l l l l l l l
40
2.7 C Language Definitions l l l l l l l l l l l l l l l
47
2.8 NumericalLimits l l l l l l l l l l l l l l l l l
52
2.9 Symbolic Constants l l l l l l l l l l l l l l l l
57
Section 3: Process Primitives l l l l l l l l l l l l l l l l
57
3.1 Process Creation and Execution l l l l l l l l l l l l
57
3.1.1 Process Creation l l l l l l l l l l l l l l l
59
3.1.2 ExecuteaFile l l l l l l l l l l l l l l l l
64
3.1.3 Register Fork Handlers l l l l l l l l l l l l
65
3.2 Process Termination l l l l l l l l l l l l l l l l
65
3.2.1 Wait for Process Termination l l l l l l l l l l
68
3.2.2 Terminate a Process l l l l l l l l l l l l l l
70
3.3 Signals l l l l l l l l l l l l l l l l l l l l l
70
3.3.1 Signal Concepts l l l l l l l l l l l l l l l
l l l l l l l l l l l 79
3.3.2 Send a Signal to a Process
l l l l l l l l 80
3.3.3 Manipulate Signal Sets
82
3.3.4 Examine and Change Signal Action l l l l l l l l l
84
3.3.5 Examine and Change Blocked Signals l l l l l l l
86
3.3.6 Examine Pending Signals l l l l l l l l l l l l
87
3.3.7 Wait for a Signal l l l l l l l l l l l l l l l
88
3.3.8 Synchronously Accept a Signal l l l l l l l l l l
ii

---------------------- Page: 6 ----------------------
90
3.3.9 Queue a Signal to a Process l . l . l l l l l l l
92
3.3.10 Send a Signal to aThread l l l l l l l l l l . l
3.4 Timer Operations l l l l l l l l l l l l l l l l l 93
3.4.1 ScheduleAlarm l eeeeeeeeeeeeee 93
3.4.2 Suspend Process Execution l l l l l l l l l l l 94
3.4.3 Delay Process Execution l l l l l l l l l l l l 94
97
Section 4: Process Environment l l l l l l l l l l l l l l l
4.1 Process1dentification. 97
97
4.1.1 Get Process and Parent Process IDS l l l l l l l l
4.2 User Identification l l l l l l l l l l l l l l l l l 98
4.2.1 Get Real User, Effective User, Real Group, and Effective Group
l l l l l l l l l l l l 98
IDS
98
l l l l l l l l l l
4.2.2 Set User andeGroup 16s l
100
4.2.3 Get Supplementary Group ;Ds’ l l l l . l l l l l
101
4.2.4 Get User Name l l l l l l l l l l l l l l l
102
4.3 Process Groups l l l l l l l l l l l l l l l l l l
102
4.3.1 Get Process GroupID l l l l l l l l l l e l l
l l l l l l 103
4.3.2 Create Session and Set Process Group ID
103
4.3.3 Set Process Group ID for Job Control l l l l l l l l
105
4.4 System Identification l l l l l l l l l l l l l l l l
105
4.4.1 Get System Name l l l l l l l l l l l l l l
l l l l l l l l l l l l 106
l l l
4.5 Time
106
4.5.1 Get SystemTimk l l l l l l l l l l l l l l l
106
4.5.2 Get Process Times l l l l l l l l l l l l l l
108
4.6 Environment Variables l l l l l l . l l . l l l l .
108
4.6.1 Environment Access l l l l l l l l l l l l l l
108
4.7 Terminal Identification l l l l l l l l l l l l l l l
108
4.7.1 Generate Terminal Pathname l l l l l l l l l l
109
4.7.2 Determine Terminal Device Name l l l l l l l l l
110
4.8 Configurable System Variables l l l l l l l l l l l l
110
4.8.1 Get Configurable System Variables l l l l l l l l
113
Section 5: Files and Directories l l l l l l l l l l l l l l l
l l l l l l l l l l l 113
5.1 Directories
113
5.1.1 Format’of’oirectory Entries’ l l l l l l l l l l l
113
5.1.2 Directory Operations l l l l l l l l l l l l l
116
5.2 Working Directory l l l l l l l l l l l l l l l l l
116
5.2.1 Change Current Working Directory l l l l l l l l
117
5.2.2 Get Working Directory Pathname l l l l l l l l l
118
5.3 General File Creation l l l l l l l l l l l . l l l l
118
5.3.1 Open aFile l l l l l l l l l l l l l l l l l
122
5.3.2 Create a New File or Rewrite an Existing One l l l . l
122
5.3.3 Set File Creation Mask l l l l l l l l l l l l l
123
5.3.4 Link to a File l l l l l l l l . l l l l . l l
125
5.4 Special File Creation l l l l l l l l l l l l . l l l
125
5.4.1 Make a Directory l l l l l l l l l l l l l l l
126
5.4.2 Make a FIFO Special File l l l l l l l l l l l l
127
5.5 File Removal l l l l l l l l l l l l l e l l l l l
127
5.5.1 Remove Directory Entries l l l l l l l l l l l l
. . .
111

---------------------- Page: 7 ----------------------
5.5.2 Remove a Directory . . . . . . . . . . . . . . 129
5.5.3 Rename a File . l . . . . . . . . . . . . . . 130
5.6 File Characteristics l l l l 132
5.6.1 File Character&i& ieider and ‘Data Str’ucture l l l l 132
5.6.2 Get File Status l l l l l l l l l l l l 134
5.6.3 Check File Accessibility l l l l l l l l l l l l l 136
5.6.4 Change File Modes l l l l l l l l l l l l l l 137
5.6.5 Change Owner and Group of a File l l l l l l l 139
5.6.6 Set File Access and Modification Times’ l l l l l l l 140
5.6.7 Truncate a File to a Specified Length l l l l l l l l 142
5.7 Configurable Pathname Variables l l l l l l l 143
5.7.1 Get Configurable Pathname Variables l l l l l l l l 143
Section 6: Input and Output Primitives l l l l l l l l l l l l 147
l l l l l l l l l 147
6.1 Pipes
6.1.1 Create an !Inte&roce’ss Channel l l l l l l l l l l 147
l l 148
6.2 File Descriptor Manipulation l l l l l l l l l l l
l l 148
6.2.1 Duplicate an Open File Descriptor l l l l l l l
6.3 File Descriptor Deassignment l l l l l l l l l l l l l 149
6.3.1 Close a File l l l l l l l l l l l l l l l l l 149
l l 151
6.4 Input and Output l l l l l l l l l l l l l l l
l l 151
6.4.1 Read from a File l l l l l l l l l l l l l
l l 153
6.4.2 Write to a File l l l l l l l l l l l l l l
l l 156
6.5 Control Operations on Files l l l l l l l l l l l l
6.5.1 Data Definitions for File Control Operations l l l l l 156
6.5.2 File Control l l l l l l l l l 156
6.5.3 Reposition Readlw;it;! Filebffset l l l l l l l l l 161
l l 163
6.6 File Synchronization l l l l l l l l l l l l l l
6.6.1 Synchronize the State of a File l l l l l l l l l l 163
l l 164
6.6.2 Synchronize the Data of a File l l l l l l l l
l l 165
6.7 Asynchronous Input and Output l l l l l l l l l l
6.7.1 Data Definitions for Asynchronous Input and Output l l 165
l l 168
6.7.2 Asynchronous Read l l l l l l l l l l l l
l l 170
6.7.3 Asynchronous Write l l l l l l l l l l l l
l l 172
6.7.4 List Directed I/O l l l l l l l l l l l l l
175
6.7.5 Retrieve Error Status of Asynchronous I/O Operation l l
6.7.6 Retrieve Return Status of Asynchronous I/O Operation l l 176
6.7.7 Cancel Asynchronous I/O Request l l l l l l l l l 177
l l l l l l l l 178
6.7.8 Wait for Asynchronous I/O Request
l l 180
6.7.9 Asynchronous File Synchronization l l l l l l
183
Section 7: Device- and Class-Specific Functions l l l l l l l l l l
183
7.1 General Terminal Interface l l l l l l l l l l l l l l
183
7.1.1 Interface Characteristics l l l l l l l l l l l l
183
7.1.1.1 Opening a Terminal Device File l l l l l l
183
7.1.1.2 Process Groups l l l l l l l l l l l l
184
7.1.1.3 The Controlling Terminal l l l l l l l l l
184
7.1.1.4 Terminal Access Control l l l l l l l l l
185
7.1.1.5 Input Processing and Reading Data l l l l l
186
7.1.1.6 Canonical Mode Input Processing l l l l l l
iv

---------------------- Page: 8 ----------------------
186
7.1.1.7 Noncanonical Mode Input Processing l l l l l
187
7.1.1.8 Writing Data and Output Processing l l l l l
187
7.1.1.9 Special Characters l l l l l l l l l l l
189
7.1.1.10 Modem Disconnect l l l l l l l l l l l
189
7.1.1.11 Closing a Terminal Device File l l l l l l l
189
7.1.2 Parameters That Can Be Set l l l l l l l l l l l
189
7.1.2.1 termios Structure l l l l l l l l l l l
190
7.1.2.2 Input Modes l l l l l l l l l l l l l
191
7.1.2.3 Output Modes l l l l l l l l l l l l
192
7.1.2.4 Control Modes l l l l l l l l l l l l
193
7.1.2.5 Local Modes l l l l l l l l l l l l l
194
7.1.2.6 Special Control Characters l l l l l l l l
195
7.1.2.7 Baud RateValues l l l l l l l l l l l
195
7.1.3 Baud Rate Functions l l l l l l l l l l l l l
195
7.1.3.1 Synopsis l l l l l l l l l l l l l l
196
7.1.3.2 Description l l l l l l l l l l l l l
196
7.1.3.3 Returns l l l l l l l l l l l l l l l
l l l l l l l l l l l l 196
7.1.3.4 Errors
196
l l l l l l l
7.1.3.5 Cross-References l
197
7.2 General Terminal Interface Control Functions’ l l l l l l l
l l l l l l l l l l l l 197
Get and Set State l
7.2.1
l l l l l l l l l 199
7.2.2 Line Control Functions l
201
7.2.3 Get Foreground Process Group 1; l l l l l l l l l
202
7.2.4 Set Foreground Process Group ID l l l l l l l l l
l 205
Section 8: Language-Specific Services for the C Programming Language
205
8.1 Referenced C Language Routines l l l l l l l l l l l l
l l l l l l l l l 206
8.1.1 Extensions to Time Functions
208
8.1.2 Extensions to setZocaZe() Function l l l l l l l l l
209
8.2 C Language Input/Output Functions l l l l l l l l l l
210
8.2.1 Map a Stream Pointer to a File Descriptor l l l l l l
211
8.2.2 Open a Stream on a File Descriptor l l l l l l l l
212
8.2.3 Interactions of Other FILE-Type C Functions l l l l l
216
8.2.4 Operations on Files - the remove () Function l l l l l
216
8.2.5 Temporary File Name - the tmpnam() Function l l l l
216
8.2.6 Stdio Locking Functions l l l l l l l l l l l l
217
8.2.7 Stdio With Explicit Client Locking l l l l l l w l l
218
8.3 Other C Language Functions l l l l l l l l l l l l l
218
8.3.1 Nonlocal Jumps l l l l l l l l l l l l l l l
219
8.3.2 Set Time Zone l l l l l l l l l l l l l l l l
219
8.3.3 Find String Token l l l l l l l l l l l l l l
220
8.3.4 ASCII Time Representation l l l l l l l l l l l
221
8.3.5 Current Time Representation l l l l l l l l l l
222
8.3.6 Coordinated Universal Time l l l l l l l l l l l
223
8.3.7 LocalTime l l l l l l l l l l l l l l l l l
223
8.3.8 Pseudo-Random Sequence Generation Functions l l l l
225
Section 9: System Databases l l l l l l l l l l l l l l l l
225
9.1 System Databases l l l l l l l l l l l l l l l l l
226
9.2 Database Access l l l l l l l l l l l l l l l l l

---------------------- Page: 9 ----------------------
9.2.1 Group Database Access l l l l l l l l l l l l 226
9.2.2 User Database Access l l l l l l l l l l l l l 227
Section 10: Data Interchange Format l l l l l l l l l l l l l 231
10.1 Archive/Interchange File Format l l l l l l l l l l l l 231
10.1.1 Extended tar Format l l l l l l l l l l l l l 231
10.1.2 Extended cpio Format l l l l l l l l l l l l 235
10.1.3 Multiple Volumes l l l l l l l l l l l l l l 239
l
Section 11: Synchronization l l l l l l l l l l l l l 241
11.1 Semaphore Characteristics l l l l l l l l l l l l l l 241
11.2 Semaphore Functions l l l l l l l l l l l l l l l l 241
11.2.1 Initialize an Unnamed Semaphore l l l l l l l l l
241
11.2.2 Destroy an Unnamed Semaphore l l l l l l l l l 243
11.2.3 Initialize/Open a Named Semaphore l l l l l l l l 244
11.2.4 Close a Named Semaphore l l l l l l l l l l l 246
11.2.5 RemoveaNamed Semaphore l l l l l l l l l l 247
11.2.6 Locka Semaphore l l l l l l l l l l l l l l 248
l
11.2.7 Unlock a Semaphore l l l l l l l l l 250
11.2.8 Get thevalue of a Semaphore’ l l l l l l l l l l 251
11.3 Mutexes l l l l l l l l l l 252
11.3.1 Mu&x Initiahza’tioh Attributes l l l l l l l l 253
11.3.2 Initializing and Destroying a Mutex’ l l l l l l l l 255
l l l l l l l l l
11.3.3 Locking and Unlocking a Mutex 257
11.4 Condition Variables l l l l l 259
l l l l
11.4.1 Condition Variable’In~tializ’atibn Attributes l 259
11.4.2 Initializing and Destroying Condition Variables’ l l l l 261
11.4.3 Broadcasting and Signaling a Condition l l l l l l l 263
11.4.4 Waiting on a Condition l l l l l l l l l l l l l 264
Section 12: Memory Management l l l l l l l l l l l l l l 267
12.1 Memory Locking Functions l l l l l l l l l l l l l l 268
12.1.1 Lock/Unlock the Address Space of a Process l l l l 268
12.1.2 Lock/Unlock a Range of Process Address Space l l l l l 270
12.2 Memory Mapping Functions l l l l l 272
12.2.1 Map Process Addresses tb a’ M’embr; Object l l l l l l 272
12.2.2 Unmap Previously Mapped Addresses l l l l l l l 276
12.2.3 Change Memory Protection l l l l l l l l l l l 277
12.2.4 Memory Object Synchronization l l l l l l l l l 279
12.3 Shared Memory Functions l l l l l l l l l l l l l l 281
12.3.1 Open a Shared Memory Object l l l l l l l l l l 281
12.3.2 Remove a Shared Memory Object l l l l l l l l l
284
Section 13: Execution Scheduling l l l l l l l l l l l l l l 287
13.1 Scheduling Parameters l l l l l l l l l l l l l l l 287
13.2 Scheduling Policies l l l l l l l l l l l l l l l l 287
13.2.1 SCHED FIFO l l l l l l l l l l l l l l l l 288
l l l l l l l l l l l l
13.2.2 SCHED-RR l l l 289
.
l l l l l l l l l
13.2.3 SCHED-OTHER l l l l l 289
13.3 Process Scheduling Functions l l l l l l l l l l l l l
290
vi

---------------------- Page: 10 ----------------------
290
13.3.1 Set Scheduling Parameters l l l l l l l l l l l
291
13.3.2 Get Scheduling Parameters l l l l l l l l l l l
l l l 293
13.3.3 Set Scheduling Policy and Scheduling Parameters
294
13.3.4 Get Scheduling Policy l l l l l l l l l l l l l
295
13.3.5 Yield Processor l l l l l l l l l l l l l l l
296
13.3.6 Get Scheduling Parameter Limits l l l l l l l l l
297
13.4 Thread Scheduling l l l l l l l l l l l l l l l l l
298
13.4.1 Thread Scheduling Attributes l l l l l l l l l l
298
13.4.2 Scheduling Contention Scope l l l l l l l l l l
299
13.4.3 Scheduling Allocation Domain l l l l l l l l l l
300
13.4.4 Scheduling Documentation l l l l l l l l l l l
300
13.5 Thread Scheduling Functions l l l l l l l l l l l l l
300
13.5.1 Thread Creation Scheduling Attributes l l l l l l l
302
13.5.2 Dynamic Thread Scheduling Parameters Access l l l l
l 304
l l l l l
13.6 Synchronization Scheduling
304
13.6.1 Mutex Initialization Scheduling Attribute’s l l l l l l
307
13.6.2 Change the Priority Ceiling of a Mutex l l l l l l l
l l l l l l l l l l 309
Section 14: Clocks and Timers
l l l 309
l l l l
14.1 Data Definitions for Clocks ahdeTimers l l l
l 309
l l l l l l l
14.1.1 Time Value Specification Structures
l 310
l l l l l l
14.1.2 Timer Event Notification Control Block
l l l 310
l l l l
14.1.3 Type Definitions l l l l l l l l
l 310
l l l l l l
14.1.4 Manifest Constants l l l l l l l
l 311
l l l l l l
14.2 Clock and Timer Functions l l l l l l l
l l l l l 311
l l l l l l
14.2.1 Clocks
l 312
l l l l l l
14.2.2 Create a Per:Process ‘&rner’ l l l l
l 314
l l l l l l
14.2.3 Delete a Per-Process Timer l l l l
315
l l l l l l l
14.2.4 Per-Process Timers l l l l l l l
l l l l l l l 317
14.2.5 High Resolution Sleep l l l l l l
319
Section 15: Message Passing l l l l l l l l l l l l l l l l
319
15.1 Data Definitions for Message Queues l l l l l l l l l l
319
15.1.1 Data Structures l l l l l l l l l l l l l l l
320
15.2 Message Passing Functions l l l l l l l l l l l l l l
320
15.2.1 Open aMessage Queue l l l l l l l l l l l l
323
15.2.2 Close a Message Queue l l l l l l l l l l l l
324
15.2.3 Remove a Message Queue l l l l l l l l l l l l
325
15.2.4 Send a Message to a Message Queue l l l l l l l l
327
15.2.5 Receive a Message From a Message Queue l l l l l l
l
328
15.2.6 Notify Process That a Message is Available on a Queue
329
15.2.7 Set Message Queue Attributes l l l l l l l l l l
331
15.2.8 Get Message Queue Attributes l l l l l l l l l l
333
Section 16: Thread Management l l l l l l l l l l l l l l l
l l l l l l l l 333
l l l l l l l l l
16.1 Threads
l l l l l l l l l l l 333
16.2 Thread Functions’
333
16.2.1 Thread Creation Attributes’ l l l l l l l l l l l
336
l l l l l l l l l l l l l l l
16.2.2 Thread Creation
337
16.2.3 Wait for Thread Termination l l l l l l l l l l
vii

---------------------- Page: 11 ----------------------
16.2.4 Detaching a Thread l l l l l l l l l l l l l l 338
16.2.5 Thread Termination l l l l l l l l l l l l l l 339
16.2.6 Get ThreadID l l l l l l l l l l l l l l l l 340
16.2.7 Compare Thread IDS l l l l l l l l l l 341
16.2.8 Dynamic Package Initializa’tioh l l l l l l l l l l
342
Section 17: Thread-Specific Data l l l l l l l l l l l l l l l 343
17.1 Thread-Specific Data Functions l l l l l l l l l 343
17.1.1 Thread-Specific Data Key Creation l l l l l l l l 343
17.1.2 Thread-Specific Data Management l l l l l l l l
344
17.1.3 Thread-Specific Data Key Deletion l l l l l l l l l
346
Section 18: Thread Cancellation l l l l l l l l l l l l l l 347
18.1 Thread Cancellation Over-vie; l l l l l l l l l l l l l 347
18.1.1 Cancelability States l l l l l l l l l l l l l l 347
18.1.2 Cancellation Points l l l l l l l l l l l l l l 348
18.1.3 Thread Cancellation Cleanup Handlers l l l l l l l 349
18.1.4 Async-Cancel Safety l l l l l l l l l l l l l l 349
18.2 Thread Cancellation Functions l l l l l l l l l l l l 350
18.2.1 Canceling Execution of a Thread l l l l l l l l l 350
18.2.2 Setting Cancelability State l l l l l l l l 351
18.2.3 Establishing Cancellation Handlers l l l l l l l 352
18.3 Language-Independent Cancellation Functionality l l l l l l 353
18.3.1 Requesting Cancellation l l l l l l l l l l l l 353
18.3.2 Associating Cleanup Code With SCOPES l l l l l l l 353
18.3.3 Controlling Cancellation Within Scopes l l l l l l l 354
18.3.4 Defined Cancellation Sequence l l l l l l l l l l 354
18.3.5 List of Cancellation Points l l l l l l l l l l l 354
l
Annex A (informative) Bibliography l l l l l l l l l l l 355
A.1 Related Open Systems Standards l l l l l l l l l l l 355
A.2 Other Standards l l l l l l 357
A.3 Historical Documentation l and IhtrbductoryeTexts l l l l l l 358
A.4 Other Sources of Information l l l l l l l l l l l l l 360
Annex B (informative) Rationale and Notes l l l l l l l l l l l 361
B. 1 Scope and Normative Cross-References l l l l l l l l l l 361
B.2 Definitions and General Requirements l l l l l l l l l l 373
B.3 Process Primitives l l l l l l l l l l l l l l l l l 413
B.4 Process Environment l l l l l l l l l l l l l l l l 446
B.5 Files and Directories l l l l l l l l l l l l l l l l 453
B.6 Input and Output Primitives l l l l l l l l l l l l l
464
B .7 Device- and Class-Specific Functions l l
481
B.8 Language-Specific Services for the C P’gramming Language l l 492
B.9 System Databases l l l l l w l l l l l l l l l l l 504
B.10 Data Interchange Format l l l l l l l l l l l l l l
505
l
B. 11 Synchronization l l l l l l l l l l l l l l 512
B.12 Memory Management l l l l l l l l l l l l l l l :
530
B.13 Execution Scheduling l l l l l l l l l l l l l l l l
543
B.14 Clocks andTimers l l l l l l l l l l l l l l l l l 552
. . .
Vlll

---------------------- Page: 12 ----------------------
560
B.15 Message Passing l l l l l l l l l l l l l l l l l
564
B.16 Thread Management l l l l l l l l l l l l l l l l
572
B.17 Thread-Specific Data l l l l l l l l l l l l l l l l
576
B.18 Thread Cancellation l l l l l l l l l l l l l l l l
587
Annex C (informative) Header Contents Samples l l l l l l l l l
607
Annex D (informative) Profiles l l l l l l l l l l l l l l l
l l l l l 607
l l l l l
D. 1 Definitions
609
D.2 Options in This Pardof;S;)/I&9945 l l l l l l l l l l l
609
D.3 Related Standards l l l l l l l l l l l l l l l l l
609
D.4 Related Activities l l l l l l l l l l l l l l l l l
610
D.5 Relationship to IEEE Std 1003.0-1995 l l l l l l l l l i
611
Annex E (informative) Sample National Profile l l l l l l l l l
612
E. 1 (Example) Profile for Denmark l l l l l l l l l l l l
615
Annex F (informative) Portability Considerations l l l l l l l l l
615
F.l User Requirements l l l l l l l l l l l l l l l l
617
F.2 Portability Capabilities l l l l l l l l l l l l l l l
622
F.3 Profiling Considerations l l l l l l e l l l l l l l l
631
Annex G (informative) Performance Metrics l l l l l l l l l l l
631
G.l Performance Measurement Documentation l l l l l l l l
632
G.2 Signals l l l l l l l l l l l l l l l l l l l l l
633
G.3 Synchronized Input and Output l l l l l l l l l l l l
635
G.4 Asynchronous Input and Output l l l l l l l l l l l l
637
G.5 Semaphores l l l l l l l l l l l l l l l l l l l
638
G.6 Mutexes and Condition Variables l l l l l l l l l l l l
639
G.7 Process Memory Locking l l l l l l l l l l l l l l l
640
G.8 SharedMemory l l l l l l l l l l l l l l l l l l
640
G.9 Execution Scheduling l l l l l l l l l l l l l l l l
643
G.10 Clocks and Timers l l l l l l l l l l l l l l l l l
645
G.11 Message Passing l l l l l l l l l l l l l l l l l
646
G.12 Thread Management l l l l l l l l l l l l l l l l
647
G.13 Thread Cancellation l l l l l l l l l l l l l l l l
649
Annex H (informative) Realtime Files l l l l l l l l l l l l l
650
H.l Data Definitions for Realtime Files l l l l l l l l l l l
656
H.2 Realtime File Functions l l l l l l l l l l l l l l l
668
H.3 Realtime Files l l l l l l l l l l l l l l l l l l
670
H.4 Rationale for Realtime Files l l l l l l l l l l l l l
673
H.5 Realtime File Functions l l l l l l l l l l l l l l l
679
Identifier Index l l l l l l l l l l l l l l l l l l l l l
691
Alphabetic Topical Index l l l l l l l l l l l l l l l l l l
iX

---------------------- Page: 13 ----------------------
TABLES
-
Table 2-l Primitive System Data Types l l l l l l l l l l 38
-
Table 2-2 Reserved Header Symbols l l l l l l l l l l l l 42
-
Table 2-3 MinimumValues l l l l l l l l l l l l l l l 48
-
Table 2-4 Run-Time Increasable Values l l 49
-
l l
Table 2-5 Run-Time Invariant Values (Possibly Indeterminate) l 50
-
Pathname Variable Values l l l l l l l l l l l 51
Table 2-6
-
Table 2-7 Invariant Value l l l l l l l l l l l l l l l 52
-
Table 2-7a MaximumValues l l l l l l l l l l l l l l l 52
-
Table 2-8 Symbolic Constants for the access0 Function l l l l l 53
-
Table 2-S Symbolic Constants for the Zseek() Function l l l l l 53
-
Table 2-10 Compile-Time Symbolic Constants l l l l l l l l l 54
-
Table 2-11 Execution-Time Symbolic Constants l l l l l l l l 55
-
Table 3-l Required Signals l l l l l l l l l l l
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.