IEEE HomeSearch IEEE ShopWeb Account Contact IEEE IEEE
MembershipPublicationsServicesStandardsConferencesCareers/Jobs
IEEE-SA IEEE-SA Member Area Search our standards database for Abstract, Sponsor, Status, Contact,Ordering and Historical information. IEEE-SA Standards Association
Products & ServicesIEEE-SA MembershipStandards DevelopmentNews & InformationnavFillerHOMEHOME Icon

IEEE Std International Standard ISO/IEC 9945-1: 1996 (E) and 1003.1, 1996 Edition (Incorporating ANSI/IEEE Stds 1003.1-1990, 1003.1b-1993, 1003.1c-1995, and 1003.1i-1995)Information technology— Portable Operating System Interface (POSIX®)—Part 1: System Application Program Interface (API) [C Language] -Description

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 system services for input/output, file system access, and process management. It also defines a format for data interchange. When options specified in the Realtime Extension are included, the standard also defines interfaces appropriate for realtime applications. 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

Content +

  • 1. General
    • 1.1 Scope
    • 1.2 Normative References
    • 1.3 Conformance
      • 1.3.1 Implementation Conformance
      • 1.3.2 Application Conformance
      • 1.3.3 Language-Dependent Services for the C Programming Language
      • 1.3.4 Other C Language-Related Specifications
      • 1.3.5 Other Language-Related Specifications
  • 2. Terminology and General Requirements
    • 2.1 Conventions
    • 2.2 Definitions
      • 2.2.1 Terminology
      • 2.2.2 General Terms
      • 2.2.3 Abbreviations
    • 2.3 General Concepts
    • 2.4 Error Numbers
    • 2.5 Primitive System Data Types
    • 2.6 Environment Description
    • 2.7 C Language Definitions
      • 2.7.1 Symbols From the C Standard
      • 2.7.2 POSIX.1 Symbols
      • 2.7.3 Headers and Function Prototypes
    • 2.8 Numerical Limits
      • 2.8.1 C Language Limits
      • 2.8.2 Minimum Values
      • 2.8.3 Run-Time Increasable Values
      • 2.8.4 Run-Time Invariant Values (Possibly Indeterminate)
      • 2.8.5 Pathname Variable Values
      • 2.8.6 Invariant Values
      • 2.8.7 Maximum Values
    • 2.9 Symbolic Constants
      • 2.9.1 Symbolic Constants for the access() Function
      • 2.9.2 Symbolic Constant for the lseek() Function
      • 2.9.3 Compile-Time Symbolic Constants for Portability Specifications
      • 2.9.4 Execution-Time Symbolic Constants for Portability Specifications
  • 3. Process Primitives
    • 3.1 Process Creation and Execution
      • 3.1.1 Process Creation
      • 3.1.2 Execute a File
      • 3.1.3 Register Fork Handlers
    • 3.2 Process Termination
      • 3.2.1 Wait for Process Termination
      • 3.2.2 Terminate a Process
    • 3.3 Signals
      • 3.3.1 Signal Concepts
      • 3.3.2 Send a Signal to a Process
      • 3.3.3 Manipulate Signal Sets
      • 3.3.4 Examine and Change Signal Action
      • 3.3.5 Examine and Change Blocked Signals
      • 3.3.6 Examine Pending Signals
      • 3.3.7 Wait for a Signal
      • 3.3.8 Synchronously Accept a Signal
      • 3.3.9 Queue a Signal to a Process
      • 3.3.10 Send a Signal to a Thread
    • 3.4 Timer Operations
      • 3.4.1 Schedule Alarm
      • 3.4.2 Suspend Process Execution
      • 3.4.3 Delay Process Execution
  • 4. Process Environment
    • 4.1 Process Identification
      • 4.1.1 Get Process and Parent Process IDs
    • 4.2 User Identification
      • 4.2.1 Get Real User, Effective User, Real Group, and Effective Group IDs
      • 4.2.2 Set User and Group IDs
      • 4.2.3 Get Supplementary Group IDs
      • 4.2.4 Get User Name
    • 4.3 Process Groups
      • 4.3.1 Get Process Group ID
      • 4.3.2 Create Session and Set Process Group ID
      • 4.3.3 Set Process Group ID for Job Control
    • 4.4 System Identification
      • 4.4.1 Get System Name
    • 4.5 Time
      • 4.5.1 Get System Time
      • 4.5.2 Get Process Times
    • 4.6 Environment Variables
      • 4.6.1 Environment Access
    • 4.7 Terminal Identification
      • 4.7.1 Generate Terminal Pathname
      • 4.7.2 Determine Terminal Device Name
    • 4.8 Configurable System Variables
      • 4.8.1 Get Configurable System Variables
  • 5. Files and Directories
    • 5.1 Directories
      • 5.1.1 Format of Directory Entries
      • 5.1.2 Directory Operations
    • 5.2 Working Directory
      • 5.2.1 Change Current Working Directory
      • 5.2.2 Get Working Directory Pathname
    • 5.3 General File Creation
      • 5.3.1 Open a File
      • 5.3.2 Create a New File or Rewrite an Existing One
      • 5.3.3 Set File Creation Mask
      • 5.3.4 Link to a File
    • 5.4 Special File Creation
      • 5.4.1 Make a Directory
      • 5.4.2 Make a FIFO Special File
    • 5.5 File Removal
      • 5.5.1 Remove Directory Entries
      • 5.5.2 Remove a Directory
      • 5.5.3 Rename a File
    • 5.6 File Characteristics
      • 5.6.1 File Characteristics: Header and Data Structure
      • 5.6.2 Get File Status
      • 5.6.3 Check File Accessibility
      • 5.6.4 Change File Modes
      • 5.6.5 Change Owner and Group of a File
      • 5.6.6 Set File Access and Modification Times
      • 5.6.7 Truncate a File to a Specified Length
    • 5.7 Configurable Pathname Variables
      • 5.7.1 Get Configurable Pathname Variables
  • 6. Input and Output Primitives
    • 6.1 Pipes
      • 6.1.1 Create an Inter-Process Channel
    • 6.2 File Descriptor Manipulation
      • 6.2.1 Duplicate an Open File Descriptor
    • 6.3 File Descriptor Deassignment
      • 6.3.1 Close a File
    • 6.4 Input and Output
      • 6.4.1 Read from a File
      • 6.4.2 Write to a File
    • 6.5 Control Operations on Files
      • 6.5.1 Data Definitions for File Control Operations
      • 6.5.2 File Control
      • 6.5.3 Reposition Read/Write File Offset
    • 6.6 File Synchronization
      • 6.6.1 Synchronize the State of a File
      • 6.6.2 Synchronize the Data of a File
    • 6.7 Asynchronous Input and Output
      • 6.7.1 Data Definitions for Asynchronous Input and Output
      • 6.7.2 Asynchronous Read
      • 6.7.3 Asynchronous Write
      • 6.7.4 List Directed I/O
      • 6.7.5 Retrieve Error Status of Asynchronous I/O Operation
      • 6.7.6 Retrieve Return Status of Asynchronous I/O Operation
      • 6.7.7 Cancel Asynchronous I/O Request
      • 6.7.8 Wait for Asynchronous I/O Request
      • 6.7.9 Asynchronous File Synchronization
  • 7. Device- and Class-Specific Functions
    • 7.1 General Terminal Interface
      • 7.1.1 Interface Characteristics
      • 7.1.2 Parameters That Can Be Set
      • 7.1.3 Baud Rate Functions
    • 7.2 General Terminal Interface Control Functions
      • 7.2.1 Get and Set State
      • 7.2.2 Line Control Functions
      • 7.2.3 Get Foreground Process Group ID
      • 7.2.4 Set Foreground Process Group ID
  • 8. Language-Specific Services for the C Programming Language
    • 8.1 Referenced C Language Routines
      • 8.1.1 Extensions to Time Functions
      • 8.1.2 Extensions to setlocale() Function
    • 8.2 C Language Input/Output Functions
      • 8.2.1 Map a Stream Pointer to a File Descriptor
      • 8.2.2 Open a Stream on a File Descriptor
      • 8.2.3 Interactions of Other FILE-Type C Functions
      • 8.2.4 Operations on Files — the remove() Function
      • 8.2.5 Temporary File Name — the tmpnam() Function
      • 8.2.6 Stdio Locking Functions
      • 8.2.7 Stdio With Explicit Client Locking
    • 8.3 Other C Language Functions
      • 8.3.1 Nonlocal Jumps
      • 8.3.2 Set Time Zone
      • 8.3.3 Find String Token
      • 8.3.4 ASCII Time Representation
      • 8.3.5 Current Time Representation
      • 8.3.6 Coordinated Universal Time
      • 8.3.7 Local Time
      • 8.3.8 Pseudo-Random Sequence Generation Functions
  • 9. System Databases
    • 9.1 System Databases
    • 9.2 Database Access
      • 9.2.1 Group Database Access
      • 9.2.2 User Database Access
  • 10. Data Interchange Format
    • 10.1 Archive/Interchange File Format
      • 10.1.1 Extended tar Format
      • 10.1.2 Extended cpio Format
      • 10.1.3 Multiple Volumes
  • 11. Synchronization
    • 11.1 Semaphore Characteristics
    • 11.2 Semaphore Functions
      • 11.2.1 Initialize an Unnamed Semaphore
      • 11.2.2 Destroy an Unnamed Semaphore
      • 11.2.3 Initialize/Open a Named Semaphore
      • 11.2.4 Close a Named Semaphore
      • 11.2.5 Remove a Named Semaphore
      • 11.2.6 Lock a Semaphore
      • 11.2.7 Unlock a Semaphore
      • 11.2.8 Get the Value of a Semaphore
    • 11.3 Mutexes
      • 11.3.1 Mutex Initialization Attributes
      • 11.3.2 Initializing and Destroying a Mutex
      • 11.3.3 Locking and Unlocking a Mutex
    • 11.4 Condition Variables
      • 11.4.1 Condition Variable Initialization Attributes
      • 11.4.2 Initializing and Destroying Condition Variables
      • 11.4.3 Broadcasting and Signaling a Condition
      • 11.4.4 Waiting on a Condition
  • 12. Memory Management
    • 12.1 Memory Locking Functions
      • 12.1.1 Lock/Unlock the Address Space of a Process
      • 12.1.2 Lock/Unlock a Range of Process Address Space
    • 12.2 Memory Mapping Functions
      • 12.2.1 Map Process Addresses to a Memory Object
      • 12.2.2 Unmap Previously Mapped Addresses
      • 12.2.3 Change Memory Protection
      • 12.2.4 Memory Object Synchronization
    • 12.3 Shared Memory Functions
      • 12.3.1 Open a Shared Memory Object
      • 12.3.2 Remove a Shared Memory Object
  • 13. Execution Scheduling
    • 13.1 Scheduling Parameters
    • 13.2 Scheduling Policies
      • 13.2.1 SCHED_FIFO
      • 13.2.2 SCHED_RR
      • 13.2.3 SCHED_OTHER
    • 13.3 Process Scheduling Functions
      • 13.3.1 Set Scheduling Parameters
      • 13.3.2 Get Scheduling Parameters
      • 13.3.3 Set Scheduling Policy and Scheduling Parameters
      • 13.3.4 Get Scheduling Policy
      • 13.3.5 Yield Processor
      • 13.3.6 Get Scheduling Parameter Limits
    • 13.4 Thread Scheduling
      • 13.4.1 Thread Scheduling Attributes
      • 13.4.2 Scheduling Contention Scope
      • 13.4.3 Scheduling Allocation Domain
      • 13.4.4 Scheduling Documentation
    • 13.5 Thread Scheduling Functions
      • 13.5.1 Thread Creation Scheduling Attributes
      • 13.5.2 Dynamic Thread Scheduling Parameters Access
    • 13.6 Synchronization Scheduling
      • 13.6.1 Mutex Initialization Scheduling Attributes
      • 13.6.2 Change the Priority Ceiling of a Mutex
  • 14. Clocks and Timers
    • 14.1 Data Definitions for Clocks and Timers
      • 14.1.1 Time Value Specification Structures
      • 14.1.2 Timer Event Notification Control Block
      • 14.1.3 Type Definitions
      • 14.1.4 Manifest Constants
    • 14.2 Clock and Timer Functions
      • 14.2.1 Clocks
      • 14.2.2 Create a Per-Process Timer
      • 14.2.3 Delete a Per-Process Timer
      • 14.2.4 Per-Process Timers
      • 14.2.5 High Resolution Sleep
  • 15. Message Passing
    • 15.1 Data Definitions for Message Queues
      • 15.1.1 Data Structures
    • 15.2 Message Passing Functions
      • 15.2.1 Open a Message Queue
      • 15.2.2 Close a Message Queue
      • 15.2.3 Remove a Message Queue
      • 15.2.4 Send a Message to a Message Queue
      • 15.2.5 Receive a Message From a Message Queue
      • 15.2.6 Notify Process That a Message is Available on a Queue
      • 15.2.7 Set Message Queue Attributes
      • 15.2.8 Get Message Queue Attributes
  • 16. Thread Management
    • 16.1 Threads
    • 16.2 Thread Functions
      • 16.2.1 Thread Creation Attributes
      • 16.2.2 Thread Creation
      • 16.2.3 Wait for Thread Termination
      • 16.2.4 Detaching a Thread
      • 16.2.5 Thread Termination
      • 16.2.6 Get Thread ID
      • 16.2.7 Compare Thread IDs
      • 16.2.8 Dynamic Package Initialization
  • 17. Thread-Specific Data
    • 17.1 Thread-Specific Data Functions
      • 17.1.1 Thread-Specific Data Key Creation
      • 17.1.2 Thread-Specific Data Management
      • 17.1.3 Thread-Specific Data Key Deletion
  • 18. Thread Cancellation
    • 18.1 Thread Cancellation Overview
      • 18.1.1 Cancelability States
      • 18.1.2 Cancellation Points
      • 18.1.3 Thread Cancellation Cleanup Handlers
      • 18.1.4 Async-Cancel Safety
    • 18.2 Thread Cancellation Functions
      • 18.2.1 Canceling Execution of a Thread
      • 18.2.2 Setting Cancelability State
      • 18.2.3 Establishing Cancellation Handlers
    • 18.3 Language-Independent Cancellation Functionality
      • 18.3.1 Requesting Cancellation
      • 18.3.2 Associating Cleanup Code With Scopes
      • 18.3.3 Controlling Cancellation Within Scopes
      • 18.3.4 Defined Cancellation Sequence
      • 18.3.5 List of Cancellation Points
  • Annex A Bibliography
    • A.1 Related Open Systems Standards
      • A.1.1 Networking Standards
      • A.1.2 Language Standards
      • A.1.3 Graphics Standards
      • A.1.4 Database Standards
    • A.2 Other Standards
    • A.3 Historical Documentation and Introductory Texts
    • A.4 Other Sources of Information
  • Annex B Rationale and Notes
    • B.1 Scope and Normative Cross-References
      • B.1.1 Scope
      • B.1.2 Normative Cross-References
      • B.1.3 Conformance
    • B.2 Definitions and General Requirements
      • B.2.1 Conventions
      • B.2.2 Definitions
      • B.2.3 General Concepts
      • B.2.4 Error Numbers
      • B.2.5 Primitive System Data Types
      • B.2.6 Environment Description
      • B.2.7 C Language Definitions
      • B.2.8 Numerical Limits
      • B.2.9 Symbolic Constants
    • B.3 Process Primitives
      • B.3.1 Process Creation and Execution
      • B.3.2 Process Termination
      • B.3.3 Signals
      • B.3.4 Timer Operations
    • B.4 Process Environment
      • B.4.1 Process Identification
      • B.4.2 User Identification
      • B.4.3 Process Groups
      • B.4.4 System Identification
      • B.4.5 Time
      • B.4.6 Environment Variables
      • B.4.7 Terminal Identification
      • B.4.8 Configurable System Variables
    • B.5 Files and Directories
      • B.5.1 Directories
      • B.5.2 Working Directory
      • B.5.3 General File Creation
      • B.5.4 Special File Creation
      • B.5.5 File Removal
      • B.5.6 File Characteristics
      • B.5.7 Configurable Pathname Variables
    • B.6 Input and Output Primitives
      • B.6.1 Pipes
      • B.6.2 File Descriptor Manipulation
      • B.6.3 File Descriptor Deassignment
      • B.6.4 Input and Output
      • B.6.5 Control Operations on Files
      • B.6.6 File Synchronization
      • B.6.7 Asynchronous Input and Output
    • B.7 Device- and Class-Specific Functions
      • B.7.1 General Terminal Interface
      • B.7.2 General Terminal Interface Control Functions
    • B.8 Language-Specific Services for the C Programming Language
      • B.8.1 Referenced C Language Routines
      • B.8.2 C Language Input/Output Functions
      • B.8.3 Other C Language Functions
    • B.9 System Databases
      • B.9.1 System Databases
      • B.9.2 Database Access
    • B.10 Data Interchange Format
      • B.10.1 Archive/Interchange File Format
    • B.11 Synchronization
      • B.11.1 Semaphore Characteristics
      • B.11.2 Semaphore Functions
      • B.11.3 Mutexes
      • B.11.4 Condition Variables
    • B.12 Memory Management
      • B.12.1 Memory Locking Functions
      • B.12.2 Mapped Files Functions
      • B.12.3 Shared Memory Functions
    • B.13 Execution Scheduling
      • B.13.1 Thread Scheduling
      • B.13.2 Thread Scheduling Functions
    • B.14 Clocks and Timers
      • B.14.1 Data Definitions for Clocks and Timers
      • B.14.2 Clock and Timer Functions
    • B.15 Message Passing
      • B.15.1 Data Definitions for Message Queues
      • B.15.2 Message Passing Functions
    • B.16 Thread Management
      • B.16.1 Threads
      • B.16.2 Thread Functions
    • B.17 Thread-Specific Data
      • B.17.1 Thread-Specific Data Functions
      • B.17.2 Thread-Specific Data Example
    • B.18 Thread Cancellation
      • B.18.1 Thread Cancellation Overview
      • B.18.2 Thread Cancellation Functions
      • B.18.3 Language-Independent Cancellation Functionality
  • Annex C Header Contents Samples
  • Annex D Profiles
    • D.1 Definitions
      • D.1.1 Applications Environment Profile (AEP) [profile]:
      • D.1.2 Application Specific Environment (ASE):
      • D.1.3 Application Specific Environment Description (ASED):
    • D.2 Options in This Part of ISO/IEC 9945
    • D.3 Related Standards
    • D.4 Related Activities
    • D.5 Relationship to IEEE Std 1003.0-1995
  • Annex E Sample National Profile
    • E.1 (Example) Profile for Denmark
      • E.1.1 Character Encoding
      • E.1.2 Character Encoding and Display
      • E.1.3 Locale Definitions
  • Annex F Portability Considerations
    • F.1 User Requirements
      • F.1.1 Configuration Interrogation
      • F.1.2 Process Management
      • F.1.3 Access to Data
      • F.1.4 Access to the Environment
      • F.1.5 Access to Determinism and Performance Enhancements
      • F.1.6 Operating System Dependent Profile
      • F.1.7 I/O Interaction
      • F.1.8 Internationalization Interaction
      • F.1.9 C Language Extensions
      • F.1.10 Future Growth
    • F.2 Portability Capabilities
      • F.2.1 Configuration Interrogation
      • F.2.2 Process Management
      • F.2.3 Access to Data
      • F.2.4 Access to the Environment
      • F.2.5 Bounded (Realtime) Response
      • F.2.6 Operating System Dependent Profile
      • F.2.7 I/O Interaction
      • F.2.8 Internationalization Interaction
      • F.2.9 C Language Extensions
      • F.2.10 Future Growth
    • F.3 Profiling Considerations
      • F.3.1 Configuration Options
      • F.3.2 Configurable Limits
      • F.3.3 Optional Behavior
  • Annex G Performance Metrics
    • G.1 Performance Measurement Documentation
    • G.2 Signals
    • G.3 Synchronized Input and Output
      • G.3.1 Conformance
      • G.3.2 Metrics
      • G.3.3 Transfer Metrics
    • G.4 Asynchronous Input and Output
    • G.5 Semaphores
    • G.6 Mutexes and Condition Variables
    • G.7 Process Memory Locking
    • G.8 Shared Memory
    • G.9 Execution Scheduling
      • G.9.1 Measurement Environment
      • G.9.2 Metrics Definitions
      • G.9.3 Other Requirements
    • G.10 Clocks and Timers
    • G.11 Message Passing
    • G.12 Thread Management
    • G.13 Thread Cancellation
  • Annex H Realtime Files
    • H.1 Data Definitions for Realtime Files
      • H.1.1 Realtime Files Specification Structures
    • H.2 Realtime File Functions
      • H.2.1 Create a Realtime File
      • H.2.2 Get Attributes of Realtime File
      • H.2.3 Set Attributes of Realtime File
      • H.2.4 Get Allocation Capabilities of Realtime Files and File Systems
      • H.2.5 Get Cache Capabilities of Realtime Files and File Systems
      • H.2.6 Get Buffered I/O Capabilities of Realtime Files and File Systems
      • H.2.7 Get Atomic I/O Capabilities of Realtime Files and File Systems
      • H.2.8 Get Direct I/O Capabilities of Realtime Files and File Systems
      • H.2.9 Get Increment Lists
      • H.2.10 Allocate a Suitably Aligned Data Buffer
      • H.2.11 Release a Previously Allocated Data Buffer
    • H.3 Realtime Files
      • H.3.1 Conformance
      • H.3.2 Fundamental Transfer Size
      • H.3.3 Transfer Metrics
    • H.4 Rationale for Realtime Files
    • H.5 Realtime File Functions
      • H.5.1 Data Definitions for Realtime Files
      • H.5.2 Realtime Files Specification Structures
      • H.5.3 Realtime File Functions
      • H.5.4 Performance Metrics

links: [Standard Status] - [Purchase] - [PDF*] - [Portable Applications (POSIX) Collection - Description]

available for Standards Online Portable Applications (POSIX) Collection subscribers only

spacer

Copyright ©2004 IEEE-SA
Contact IEEE-SA
(m.v.rodriguez@ieee.org)
URL: http://standards.ieee.org/reading/ieee/std_public/description/posix/9945.1-1996_desc.html

spacer