Bull AIX 4.3 - General Programming Guide

Category
Software
Type
Programming Guide
Bull
AIX 4.3 General Programming Concepts
Writing and Debugging Programs
AIX
86 A2 34JX 02
ORDER REFERENCE
Bull
AIX 4.3 General Programming Concepts
Writing and Debugging Programs
AIX
Software
November 1999
BULL ELECTRONICS ANGERS
CEDOC
34 Rue du Nid de Pie – BP 428
49004 ANGERS CEDEX 01
FRANCE
86 A2 34JX 02
ORDER REFERENCE
The following copyright notice protects this book under the Copyright laws of the United States of America
and other countries which prohibit such actions as, but not limited to, copying, distributing, modifying, and
making derivative works.
Copyright
Bull S.A. 1992, 1999
Printed in France
Suggestions and criticisms concerning the form, content, and presentation of
this book are invited. A form is provided at the end of this book for this purpose.
To order additional copies of this book or other Bull Technical Publications, you
are invited to use the Ordering Form also provided at the end of this book.
Trademarks and Acknowledgements
We acknowledge the right of proprietors of trademarks mentioned in this book.
AIX
R
is a registered trademark of International Business Machines Corporation, and is being used under
licence.
UNIX is a registered trademark in the United States of America and other countries licensed exclusively through
the Open Group.
Year 2000
The product documented in this manual is Year 2000 Ready.
The information in this document is subject to change without notice. Groupe Bull will not be liable for errors
contained herein, or for incidental or consequential damages in connection with the use of this material.
Contents
Trademarks and Acknowledgements . . iii
Legal Notices . . . . . . . . . . . . . . iii
About This Book . . . . . . . . . . xvii
Who Should Use This Book . . . . . . . . xvii
How to Use This Book . . . . . . . . . . xvii
Highlighting . . . . . . . . . . . . xvii
ISO 9000 . . . . . . . . . . . . . . . xvii
AIX 32-Bit and 64-Bit Support for the UNIX98
Specification . . . . . . . . . . . . . xvii
Related Publications . . . . . . . . . . . xviii
Ordering Publications . . . . . . . . . . xviii
Chapter 1. Tools and Utilities . . . . . 1
Entering a Program into the System . . . . . . 1
Checking a Program . . . . . . . . . . . . 1
Compiling and Linking a Program . . . . . . . 1
Correcting Errors in a Program . . . . . . . 2
Building and Maintaining a Program . . . . . 2
Subroutines. . . . . . . . . . . . . . . 3
Shell Commands . . . . . . . . . . . . . 3
AIX Support for the X/Open UNIX95 Specification . 3
AIX 32-Bit and 64-Bit Support for the UNIX98
Specification . . . . . . . . . . . . . . 3
Chapter 2. The Curses Library . . . . . 5
Terminology . . . . . . . . . . . . . . 5
Naming Conventions . . . . . . . . . . . 6
Structure of a Curses Program . . . . . . . . 7
Return Values . . . . . . . . . . . . . 7
Initializing Curses . . . . . . . . . . . . 7
Windows in the Curses Environment . . . . . . 8
The Default Window Structure . . . . . . . 8
The Current Window Structure . . . . . . . 9
Subwindows . . . . . . . . . . . . . 9
Pads. . . . . . . . . . . . . . . . 10
Manipulating Window Data with Curses . . . . 10
Creating Windows . . . . . . . . . . . 10
Removing Windows, Pads, and Subwindows . . 11
Changing the Screen or Window Images. . . . 11
Manipulating Window Content . . . . . . . 12
Support for Filters . . . . . . . . . . . 13
Controlling the Cursor with Curses . . . . . . 13
Manipulating Characters with Curses. . . . . . 14
Character Size . . . . . . . . . . . . 14
Adding Characters to the Screen Image . . . . 14
Enabling Text Scrolling . . . . . . . . . 19
Deleting Characters. . . . . . . . . . . 19
Getting Characters . . . . . . . . . . . 20
Understanding Terminals with curses. . . . . . 25
Manipulating Multiple Terminals . . . . . . 25
Setting Terminal Input and Output Modes . . . 25
Using the terminfo and termcap Files. . . . . 28
Low-Level Screen Subroutines . . . . . . . 29
Manipulating TTYs . . . . . . . . . . . 30
Synchronous and Networked Asynchronous
Terminals . . . . . . . . . . . . . . 30
Working with Color . . . . . . . . . . . 30
Manipulating Video Attributes . . . . . . . . 31
Video Attributes, Bit Masks, and the Default
Colors . . . . . . . . . . . . . . . 31
Setting Video Attributes . . . . . . . . . 32
Setting Curses Options . . . . . . . . . 33
Manipulating Soft Labels . . . . . . . . . . 33
Obsolete Curses Subroutines. . . . . . . . . 34
AIX Version 3.2 Curses Compatibility. . . . . . 34
List of Additional Curses Subroutines . . . . . 35
Manipulating Windows . . . . . . . . . 35
Manipulating Characters . . . . . . . . . 35
Manipulating Terminals . . . . . . . . . 35
Manipulating Color. . . . . . . . . . . 36
Miscellaneous Utilities. . . . . . . . . . 36
Chapter 3. Debugging Programs. . . . 37
adb Debug Program Overview . . . . . . . . 37
Getting Started with the adb Debug Program . . . 37
Starting adb with a Program File . . . . . . 37
Starting adb with a Nonexistent or Incorrect File 37
Starting adb with the Default File . . . . . . 38
Starting adb with a Core Image File . . . . . 38
Starting adb with a Data File . . . . . . . 38
Starting adb with the Write Option . . . . . 39
Using a Prompt . . . . . . . . . . . . 39
Using Shell Commands from within the adb
Program . . . . . . . . . . . . . . 39
Exiting the adb Debug Program . . . . . . 39
Controlling Program Execution . . . . . . . . 40
Preparing Programs for Debugging with the adb
Program . . . . . . . . . . . . . . 40
Running a Program. . . . . . . . . . . 40
Continuing Program Execution . . . . . . . 42
Using adb Expressions. . . . . . . . . . . 44
Using Integers in Expressions . . . . . . . 44
Using Symbols in Expressions . . . . . . . 44
Using Operators in Expressions. . . . . . . 44
Customizing the adb Debug Program. . . . . . 45
Combining Commands on a Single Line . . . . 45
Creating adb Scripts . . . . . . . . . . 46
Setting Output Width . . . . . . . . . . 48
Setting the Maximum Offset . . . . . . . . 48
Setting Default Input Format . . . . . . . 48
Changing the Disassembly Mode . . . . . . 49
Computing Numbers and Displaying Text . . . . 49
Displaying and Manipulating the Source File with
the adb Program. . . . . . . . . . . . . 50
Displaying Instructions and Data . . . . . . 50
Forming Addresses . . . . . . . . . . . 50
Displaying an Address . . . . . . . . . 51
Displaying the C Stack Backtrace . . . . . . 51
Choosing Data Formats . . . . . . . . . 52
© Copyright IBM Corp. 1997, 1999 v
Changing the Memory Map . . . . . . . . 52
Patching Binary Files . . . . . . . . . . 53
Locating Values in a File . . . . . . . . . 53
Writing to a File . . . . . . . . . . . . 54
Making Changes to Memory . . . . . . . 54
Using adb Variables . . . . . . . . . . 54
Finding the Current Address . . . . . . . 55
Displaying External Variables . . . . . . . 56
Displaying the Address Maps . . . . . . . 56
adb Debug Program Reference Information . . . . 57
adb Debug Program Addresses . . . . . . . 57
adb Debug Program Expressions . . . . . . 57
adb Debug Program Operators . . . . . . . 58
adb Debug Program Subcommands . . . . . 58
adb Debug Program Variables . . . . . . . 62
Example adb Program: adbsamp . . . . . . . 62
Example adb Program: adbsamp2 . . . . . . . 62
Example adb Program: adbsamp3 . . . . . . . 63
Example of Directory and i-node Dumps in adb
Debugging . . . . . . . . . . . . . . 64
Example of Data Formatting in adb Debugging . . 65
Example of Tracing Multiple Functions in adb
Debugging . . . . . . . . . . . . . . 68
Starting the adb Program . . . . . . . . . 68
Setting Breakpoints . . . . . . . . . . . 68
Displaying a Set of Instructions. . . . . . . 69
Starting the adsamp3 Program . . . . . . . 69
Removing a Breakpoint . . . . . . . . . 69
Continuing the Program . . . . . . . . . 69
Tracing the Path of Execution . . . . . . . 69
Displaying a Variable Value . . . . . . . . 70
Skipping Breakpoints . . . . . . . . . . 70
dbx Symbolic Debug Program Overview . . . . 70
Using the dbx Debug Program . . . . . . . . 71
Starting the dbx Debug Program . . . . . . 71
Running Shell Commands from dbx . . . . . 71
Command Line Editing in dbx . . . . . . . 71
Using Program Control . . . . . . . . . 72
Running a Program. . . . . . . . . . . 72
Separating dbx Output from Program Output . . 73
Tracing Execution . . . . . . . . . . . 74
Displaying and Manipulating the Source File with
the dbx debug Program . . . . . . . . . . 74
Changing the Source Directory Path . . . . . 74
Displaying the Current File . . . . . . . . 75
Changing the Current File or Procedure . . . . 75
Debugging Programs Involving Multiple Threads 75
Debugging Programs Involving Multiple
Processes . . . . . . . . . . . . . . 78
Examining Program Data . . . . . . . . . . 79
Handling Signals . . . . . . . . . . . 79
Calling Procedures . . . . . . . . . . . 81
Displaying a Stack Trace . . . . . . . . . 81
Displaying and Modifying Variables . . . . . 82
Displaying Thread-Related Information . . . . 82
Scoping of Names . . . . . . . . . . . 82
Using Operators and Modifiers in Expression . . 83
Checking of Expression Types . . . . . . . 83
Folding Variables to Lowercase and Uppercase 84
Changing Print Output with Special Debug
Program Variables . . . . . . . . . . . 84
Debugging at the Machine Level with dbx . . . . 85
Using Machine Registers . . . . . . . . . 85
Examining Memory Addresses . . . . . . . 86
Running a Program at the Machine Level . . . 86
Debugging fdpr Reordered Executables . . . . 87
Displaying Assembly Instructions . . . . . . 87
Customizing the dbx Debugging Environment. . . 87
Defining a New dbx Prompt. . . . . . . . 87
Creating dbx Subcommand Aliases . . . . . 88
Using the .dbxinit File . . . . . . . . . . 89
List of dbx Subcommands . . . . . . . . . 89
Setting and Deleting Breakpoints . . . . . . 89
Running Your Program . . . . . . . . . 90
Tracing Program Execution . . . . . . . . 91
Ending Program Execution . . . . . . . . 91
Displaying the Source File . . . . . . . . 91
Printing and Modifying Variables, Expressions,
and Types . . . . . . . . . . . . . . 91
Thread Debugging . . . . . . . . . . . 91
Multiprocess Debugging . . . . . . . . . 91
Procedure Calling . . . . . . . . . . . 91
Signal Handling . . . . . . . . . . . . 91
Machine-Level Debugging . . . . . . . . 92
Debugging Environment Control . . . . . . 92
Chapter 4. Error Notification . . . . . 93
Security . . . . . . . . . . . . . . . 95
Examples . . . . . . . . . . . . . . . 95
Related Information . . . . . . . . . . 96
Chapter 5. File Systems and
Directories . . . . . . . . . . . . . 97
File Types . . . . . . . . . . . . . . . 97
Working with Files . . . . . . . . . . . 99
Directories . . . . . . . . . . . . . . 100
Directory Structures . . . . . . . . . . 100
Working with Directories (Programming) . . . 102
Subroutines That Control Directories . . . . 102
Working with JFS i-nodes . . . . . . . . . 103
Disk i-node Structure. . . . . . . . . . 103
In-core i-node Structure . . . . . . . . . 104
File Space Allocation . . . . . . . . . . . 104
Full and Partial Logical Blocks . . . . . . 105
Allocation in Fragmented File Systems . . . . 105
Allocation in Compressed File Systems . . . . 106
Allocation in File Systems Enabled for Large
Files . . . . . . . . . . . . . . . 106
Disk Address Format . . . . . . . . . . 106
Indirect Blocks . . . . . . . . . . . . 108
Quotas . . . . . . . . . . . . . . 110
Writing Programs That Access Large Files . . . . 111
Implications for Existing Programs . . . . . 111
Open Protection . . . . . . . . . . . 111
Porting Applications to the Large File
Environment . . . . . . . . . . . . 112
Using _LARGE_FILES . . . . . . . . . 113
Using the 64-Bit File System Subroutines . . . 114
Common Pitfalls using the Large File
Environment . . . . . . . . . . . . 115
Linking for Programmers . . . . . . . . . 119
vi General Programming Concepts
Hard Links . . . . . . . . . . . . . 119
Symbolic Links . . . . . . . . . . . . 119
Directory Links. . . . . . . . . . . . 120
Using File Descriptors . . . . . . . . . . 121
System File and File Descriptor Tables . . . . 121
Managing File Descriptors . . . . . . . . 122
Preset File Descriptor Values . . . . . . . 125
File Descriptor Resource Limit. . . . . . . 126
Related Information . . . . . . . . . . 127
File Creation and Removal . . . . . . . . . 127
Creating a File . . . . . . . . . . . . 127
Opening a File . . . . . . . . . . . . 128
Closing a File . . . . . . . . . . . . 128
Working with File I/O . . . . . . . . . . 128
Manipulating the Current Offset . . . . . . 128
Reading a File . . . . . . . . . . . . 129
Writing a File . . . . . . . . . . . . 130
Writing Programs to Use Direct I/O . . . . . 131
Direct I/O vs. Normal Cached I/O . . . . . 131
Benefits of Direct I/O . . . . . . . . . 132
Working with Pipes . . . . . . . . . . 133
Synchronous I/O . . . . . . . . . . . 135
File Status . . . . . . . . . . . . . . 136
File Accessibility . . . . . . . . . . . . 136
File System Layout . . . . . . . . . . . 138
Boot Block . . . . . . . . . . . . . 138
Superblock . . . . . . . . . . . . . 138
Allocation Bitmaps . . . . . . . . . . 138
Fragments . . . . . . . . . . . . . 138
Disk I-Nodes . . . . . . . . . . . . 138
Allocation Groups . . . . . . . . . . . 139
Using File System Subroutines. . . . . . . 139
Creating New File System Types . . . . . . . 140
File System Helpers . . . . . . . . . . 140
Mount Helpers . . . . . . . . . . . . 143
Major Control Block Header Files . . . . . . 144
Chapter 6. Floating-Point Exceptions 145
State Diagram . . . . . . . . . . . . . 145
Floating-Point Exception Subroutines . . . . . 146
Floating-Point Trap Handler Operation . . . . . 147
Exceptions: Disabled and Enabled Comparison 147
Imprecise Trapping Modes . . . . . . . . 148
Hardware-Specific Subroutines . . . . . . 148
Example of a Floating-Point Trap Handler. . . 149
Chapter 7. Input and Output Handling 155
Low-Level I/O Interfaces . . . . . . . . . 156
Stream I/O Interfaces . . . . . . . . . . 157
Terminal I/O Interfaces . . . . . . . . . . 157
Asynchronous I/O Interfaces . . . . . . . . 158
Chapter 8. Large Program Support 161
Understanding the Large Address-Space Model 161
Enabling the Large Address-Space Model . . . . 162
Executing Programs with Large Data Areas . . . 162
Special Considerations . . . . . . . . . 163
Chapter 9. Parallel Programming . . . 165
Understanding Threads . . . . . . . . . . 165
Threads and Processes . . . . . . . . . 165
Threads Implementation. . . . . . . . . 166
Thread Programming Concepts . . . . . . 169
Writing Reentrant and Thread-Safe Code . . . 174
Developing Multi-Threaded Programs . . . . 179
Developing Multi-Threaded Program Debuggers 182
Multi-Threaded Call Back Functions . . . . . 187
Benefits of Threads . . . . . . . . . . . 189
Parallel Programming Concepts . . . . . . 189
Performance Consideration . . . . . . . . 192
Limitations . . . . . . . . . . . . . 193
Chapter 10. Programming on
Multiprocessor Systems. . . . . . . 195
Identifying Processors . . . . . . . . . . 195
ODM Processor Names . . . . . . . . . 195
Logical Processor Numbers. . . . . . . . 196
ODM Processor States . . . . . . . . . 196
Controlling Processor Use . . . . . . . . . 196
The cpu_state Command . . . . . . . . 196
Example Processor Configurations . . . . . 196
Binding Processes and Kernel Threads . . . . 199
Creating Locking Services . . . . . . . . . 200
Multiprocessor-Safe Locking Services . . . . 200
Locking Services Example . . . . . . . . 201
Kernel Programming . . . . . . . . . . . 201
32-bit and 64-bit Addressability . . . . . . 202
Differences between 32-bit and 64-bit execution
environments . . . . . . . . . . . . 203
Chapter 11. Threads Programming
Guidelines . . . . . . . . . . . . . 207
Thread Implementation Model . . . . . . . 207
Thread-safe and Threaded Libraries in AIX . . . 207
Threads Versions On AIX . . . . . . . . . 208
Threads Basic Operation Overview . . . . . . 208
Creating Threads . . . . . . . . . . . . 208
Thread Attributes Object . . . . . . . . 209
Thread Creation . . . . . . . . . . . 210
Handling Thread IDs . . . . . . . . . . 211
A First Multi-Threaded Program . . . . . . 212
Terminating Threads . . . . . . . . . . . 212
Exiting a Thread . . . . . . . . . . . 212
Canceling a Thread . . . . . . . . . . 214
Using Cleanup Handlers . . . . . . . . 218
List of Threads Basic Operation Subroutines . . . 219
Synchronization Overview . . . . . . . . . 220
Using Mutexes . . . . . . . . . . . . . 220
Mutex Attributes Object . . . . . . . . . 220
Creating and Destroying Mutexes . . . . . 221
Locking and Unlocking Mutexes . . . . . . 222
Protecting Data with Mutexes . . . . . . . 222
Using Condition Variables . . . . . . . . . 224
Condition Attributes Object . . . . . . . 224
Creating and Destroying Condition Variables 225
Using Condition Variables . . . . . . . . 226
Synchronizing Threads with Condition Variables 228
Joining Threads . . . . . . . . . . . . 230
Waiting for a Thread . . . . . . . . . . 230
Returning Information from a Thread . . . . 233
Contents vii
List of Synchronization Subroutines . . . . . . 234
Scheduling Overview. . . . . . . . . . . 235
Threads Scheduling . . . . . . . . . . . 235
Basic Scheduling Facilities . . . . . . . . 235
Scheduling Policy and Priority . . . . . . 236
Contention Scope . . . . . . . . . . . 237
Synchronization Scheduling . . . . . . . . 239
Priority Inversion . . . . . . . . . . . 239
Mutex Protocols . . . . . . . . . . . 240
Choosing a Mutex Protocol. . . . . . . . 241
List of Scheduling Subroutines . . . . . . . 243
Threads Advanced Features . . . . . . . . 243
One-Time Initializations . . . . . . . . . . 243
One-Time Initialization Object . . . . . . . 243
One-Time Initialization Routine . . . . . . 244
Thread-Specific Data . . . . . . . . . . . 244
Creating and Destroying Keys . . . . . . . 245
Using Thread-Specific Data . . . . . . . . 247
Advanced Attributes . . . . . . . . . . . 248
Stack Attributes . . . . . . . . . . . 248
Process Sharing. . . . . . . . . . . . 250
Making Complex Synchronization Objects . . . . 250
Long Locks . . . . . . . . . . . . . 250
Semaphores . . . . . . . . . . . . . 251
Write-Priority Read/Write Locks . . . . . . 252
List of Threads Advanced-Feature Subroutines . . 254
Threads-Processes Interactions Overview . . . . 254
Signal Management . . . . . . . . . . . 255
Signal Handlers and Signal Masks . . . . . 255
Signal Generation . . . . . . . . . . . 255
Handling Signals . . . . . . . . . . . 256
Signal Delivery . . . . . . . . . . . . 257
Process Duplication and Termination . . . . . 258
Forking . . . . . . . . . . . . . . 258
Fork Handlers . . . . . . . . . . . . 258
Process Termination . . . . . . . . . . 259
Scheduling . . . . . . . . . . . . . . 259
Process-Level Scheduling . . . . . . . . 259
Timer and Sleep Subroutines . . . . . . . 259
List of Threads-Processes Interactions Subroutines 260
Threads Library Options . . . . . . . . . 260
List of Options . . . . . . . . . . . . 260
Checking the Availability of an Option . . . . 261
Threads Library Quick Reference . . . . . . . 262
Supported Interfaces . . . . . . . . . . 262
Threads Data Types . . . . . . . . . . 265
Limits and Default Values . . . . . . . . 265
Chapter 12. lex and yacc Program
Information . . . . . . . . . . . . 267
Creating an Input Language with the lex and yacc
Commands . . . . . . . . . . . . . . 267
Writing a Lexical Analyzer Program with the lex
Command . . . . . . . . . . . . . 267
Extended Regular Expressions in the lex
Command . . . . . . . . . . . . . 268
lex Actions . . . . . . . . . . . . . 272
Passing Code to the Generated lex Program . . 276
Defining lex Substitution Strings . . . . . . 276
lex Start Conditions . . . . . . . . . . 277
Compiling the Lexical Analyzer . . . . . . 277
lex Library . . . . . . . . . . . . . 278
Using the lex Program with the yacc Program . . 278
Creating a Parser with the yacc Program . . . 279
yacc Grammar File . . . . . . . . . . 280
Using the yacc Grammar File . . . . . . . 281
yacc Declarations . . . . . . . . . . . 283
yacc Rules . . . . . . . . . . . . . 285
yacc Actions . . . . . . . . . . . . . 287
yacc Error Handling . . . . . . . . . . 288
Lexical Analysis for the yacc Command . . . 290
yacc-Generated Parser Operation . . . . . . 290
Using Ambiguous Rules in the yacc Program 292
Turning on Debug Mode for a yacc-Generated
Parser . . . . . . . . . . . . . . . 293
Example Program for the lex and yacc Programs 293
Compiling the Example Program . . . . . . 294
Chapter 13. Logical Volume
Programming . . . . . . . . . . . 299
Logical Volume Program Example . . . . . . 299
List of Logical Volume Subroutines . . . . . . 305
Chapter 14. make Command Overview 307
Creating a Description File . . . . . . . . . 307
Format of a make Description File Entry . . . 308
Using Commands in a make Description File 308
Calling the make Program from a Description
File . . . . . . . . . . . . . . . . 309
Preventing the make Program from Writing
Commands . . . . . . . . . . . . . 309
Preventing the make Program from Stopping on
Errors . . . . . . . . . . . . . . . 310
Example of a Description File . . . . . . . 310
Making the Description File Simpler. . . . . 310
Internal Rules for the make Program . . . . . 311
Example of Default Rules File . . . . . . . 312
Single-Suffix Rules . . . . . . . . . . 312
Using the Make Command with Archive
Libraries . . . . . . . . . . . . . . 313
Changing Macros in the Rules File . . . . . 313
Defining Default Conditions in a Description
File . . . . . . . . . . . . . . . . 313
Including Other Files in a Description File. . . 314
Defining and Using Macros in a Description File 314
Using Macros in a Description File . . . . . 314
Internal Macros. . . . . . . . . . . . 315
Changing Macro Definitions in a Command . . 318
How the make Command Creates a Target File . . 318
Using the make Command with Source Code
Control System (SCCS) Files . . . . . . . . 319
Description Files Stored in the Source Code
Control System (SCCS) . . . . . . . . . . 320
Using the make Command with Non-Source Code
Control System (SCCS) Files . . . . . . . . 320
How the make Command Uses the Environment
Variables . . . . . . . . . . . . . . . 321
Example of a Description File . . . . . . . . 321
Chapter 15. m4 Macro Processor
Overview . . . . . . . . . . . . . 325
viii General Programming Concepts
Using the m4 Macro Processor . . . . . . . 325
Creating a User-Defined Macro . . . . . . . 325
Using the Quote Characters . . . . . . . 326
Arguments . . . . . . . . . . . . . 327
Using a Built-In m4 Macro . . . . . . . . . 328
Removing a Macro Definition . . . . . . . 328
Checking for a Defined Macro. . . . . . . 329
Using Integer Arithmetic . . . . . . . . 329
Manipulating Files . . . . . . . . . . 330
Redirecting Output . . . . . . . . . . 330
Using System Programs in a Program . . . . 331
Using Unique File Names . . . . . . . . 331
Using Conditional Expressions . . . . . . 331
Manipulating Strings . . . . . . . . . . 332
Printing . . . . . . . . . . . . . . 333
List of Additional m4 Macros . . . . . . . . 333
Chapter 16. National Language
Support . . . . . . . . . . . . . . 335
NLS Capabilities . . . . . . . . . . . . 335
Locale-Specific and Culture-Specific
Conventions. . . . . . . . . . . . . 335
User Messages in Native Languages. . . . . 335
Code Set Support . . . . . . . . . . . 336
Input Method Support . . . . . . . . . 336
Overview of Chapter Contents . . . . . . . 336
Locale Overview for Programming . . . . . . 337
Working with Code Sets . . . . . . . . . 337
Data Representation . . . . . . . . . . 338
Character Properties . . . . . . . . . . 339
Localization . . . . . . . . . . . . . 340
Multibyte Subroutines . . . . . . . . . 343
Wide Character Subroutines . . . . . . . 343
Bidirectionality and Character Shaping . . . . 344
Code Set Independence . . . . . . . . . 344
File Name Matching . . . . . . . . . . 345
Radix Character Handling . . . . . . . . 345
Programming Model . . . . . . . . . . 346
National Language Support Subroutines Overview 348
Introducing Locale Subroutines . . . . . . 348
Introducing Time Formatting Subroutines . . . 349
Introducing Monetary Formatting Subroutines 349
Introducing Multibyte and Wide Character
Subroutines . . . . . . . . . . . . . 349
Introducing Internationalized Regular
Expression Subroutines . . . . . . . . . 350
Locale Subroutines . . . . . . . . . . . 350
Setting the Locale . . . . . . . . . . . 350
Accessing Locale Information . . . . . . . 350
Examples. . . . . . . . . . . . . . 351
Time Formatting Subroutines . . . . . . . . 355
Examples. . . . . . . . . . . . . . 355
Monetary Formatting Subroutines . . . . . . 355
Euro Currency Support via the @euro Modifier 356
Examples. . . . . . . . . . . . . . 356
Multibyte and Wide Character Subroutines . . . 358
Multibyte Code and Wide Character Code
Conversion Subroutines . . . . . . . . . 358
Wide Character Classification Subroutines . . . 362
Wide Character Display Column Width
Subroutines . . . . . . . . . . . . . 364
Multibyte and Wide Character String Collation
Subroutines . . . . . . . . . . . . . 366
Multibyte and Wide Character String
Comparison Subroutines . . . . . . . . 368
Wide Character String Conversion Subroutines 368
Wide Character String Copy Subroutines . . . 370
Wide Character String Search Subroutines . . . 371
Wide Character Input/Output Subroutines . . 373
Working with the Wide Character Constant . . 378
Internationalized Regular Expression Subroutines 379
Examples. . . . . . . . . . . . . . 379
Layout (Bidirectional Text and Character Shaping)
Overview. . . . . . . . . . . . . . . 381
Data Streams . . . . . . . . . . . . 382
Cursor Movement . . . . . . . . . . . 383
Character Shaping. . . . . . . . . . . 384
Introducing Layout Library Subroutines . . . 385
Use of the libcur Package . . . . . . . . . 385
Code Set Overview . . . . . . . . . . . 387
ASCII Characters . . . . . . . . . . . 388
Other ASCII Characters . . . . . . . . . 389
Code Set Strategy . . . . . . . . . . . 390
Code Set Structure. . . . . . . . . . . 391
ISO Code Sets . . . . . . . . . . . . 392
IBM PC Code Sets. . . . . . . . . . . 407
UCS-2 and UTF-8 . . . . . . . . . . . 420
Converters Overview for Programming. . . . . 423
Converters Introduction . . . . . . . . . 424
Standard Converters . . . . . . . . . . 424
Understanding libiconv . . . . . . . . . 425
Using Converters . . . . . . . . . . . 428
List of Converters . . . . . . . . . . . 429
Writing Converters Using the iconv Interface . . . 451
Code Sets and Converters . . . . . . . . 451
iconv Framework - Overview of Structures . . 452
Writing a Code Set Converter . . . . . . . 454
Examples. . . . . . . . . . . . . . 458
Input Method Overview. . . . . . . . . . 465
Input Method Introduction . . . . . . . . 465
Input Method Names. . . . . . . . . . 467
Input Method Areas . . . . . . . . . . 468
Programming Input Methods . . . . . . . . 468
Initialization. . . . . . . . . . . . . 469
Input Method Management . . . . . . . 470
IM Keymap Management . . . . . . . . 470
Key Event Processing. . . . . . . . . . 471
Callbacks . . . . . . . . . . . . . . 471
Input Method Structures . . . . . . . . 471
Working with Keyboard Mapping . . . . . . 471
IM Keymaps . . . . . . . . . . . . 472
Inbound and Outbound Mapping . . . . . 473
Using Callbacks . . . . . . . . . . . . 473
Initializing Callbacks . . . . . . . . . . 476
Bidirectional Input Method . . . . . . . . . 476
Cyrillic Input Method (CIM) . . . . . . . . 477
Keymap: . . . . . . . . . . . . . . 478
Keysyms:. . . . . . . . . . . . . . 478
Reserved Keysyms: . . . . . . . . . . 478
Modifiers. . . . . . . . . . . . . . 478
Greek Input Method (GIM) . . . . . . . . . 479
Keymap: . . . . . . . . . . . . . . 479
Contents ix
Keysyms:. . . . . . . . . . . . . . 479
Reserved keysyms: . . . . . . . . . . 479
Japanese Input Method (JIM) . . . . . . . . 480
Japanese Character Processing. . . . . . . 481
Kana-To-Kanji Conversion (KKC) Technology 481
Input Modes . . . . . . . . . . . . 481
Keyboard Mapping . . . . . . . . . . 483
Character Size . . . . . . . . . . . . 483
Romaji-To-Kana Conversion (RKC) . . . . . 483
Kanji Pre-edit . . . . . . . . . . . . 484
Keymaps: . . . . . . . . . . . . . 486
Keysyms:. . . . . . . . . . . . . . 486
Reserved Keysyms: . . . . . . . . . . 486
Korean Input Method (KIM) . . . . . . . . 487
Latvian Input Method (LVIM) . . . . . . . . 489
Keymap: . . . . . . . . . . . . . . 489
Lithuanian Input Method (LTIM) . . . . . . . 489
Keymap: . . . . . . . . . . . . . . 489
Thai Input Method (THIM). . . . . . . . . 489
Keymap: . . . . . . . . . . . . . . 490
Vietnamese Input Method (VNIM) . . . . . . 490
Keymap: . . . . . . . . . . . . . . 490
Simplified Chinese Input Method (ZIM) . . . . 490
Simplified Chinese Character Processing . . . 491
Simplified Chinese Input Method (ZIM-UCS). . . 492
Chinese (CJK) Character Processing . . . . . 492
Single-Byte Input Method . . . . . . . . . 493
Traditional Chinese Input Method (TIM) . . . . 495
TIM Features . . . . . . . . . . . . 495
Traditional Chinese Character Processing . . . 496
Universal Input Method . . . . . . . . . . 497
Keymap: . . . . . . . . . . . . . . 497
List of Reserved Keysyms . . . . . . . . . 497
Reserved Keysyms for Traditional Chinese . . 498
Reserved Keysyms for Simplified Chinese (ZIM
and ZIM-UCS) . . . . . . . . . . . . 498
Message Facility Overview for Programming . . . 498
Creating a Message Source File . . . . . . 498
Creating a Message Catalog . . . . . . . 503
Displaying Messages outside of an Application
Program . . . . . . . . . . . . . . 505
Displaying Messages with an Application
Program . . . . . . . . . . . . . . 505
Example of Retrieving a Message from a
Catalog . . . . . . . . . . . . . . 507
Culture-Specific Data Processing . . . . . . . 508
Culture-Specific Tables . . . . . . . . . 508
Culture-Specific Algorithms . . . . . . . 508
Example: Load a Culture-Specific Module for
Arabic Text for an Application. . . . . . . 509
NLS Sample Program . . . . . . . . . . 510
Message Source File for foo . . . . . . . 510
Creation of Message Header File for foo . . . 511
Single Path Code Set Independent Version. . . 511
Dual-Path Version Optimized for Single-Byte
Code Sets . . . . . . . . . . . . . 513
National Language Support (NLS) Quick Reference 516
National Language Support Do’s and Don’ts 516
National Language Support Checklist . . . . 517
Message Suggestions . . . . . . . . . . 523
List of National Language Support Subroutines 526
List of Locale Subroutines . . . . . . . . . 527
List of Time and Monetary Formatting Subroutines 527
List of Multibyte Character Subroutines . . . . 527
List of Wide Character Subroutines . . . . . . 527
List of Layout Library Subroutines . . . . . . 529
List of Message Facility Subroutines . . . . . . 529
List of Converter Subroutines . . . . . . . . 530
List of Input Method Subroutines . . . . . . 530
List of Regular Expression Subroutines . . . . . 531
Chapter 17. Object Data Manager
(ODM) . . . . . . . . . . . . . . 533
ODM Object Classes and Objects . . . . . . . 533
Creating an Object Class. . . . . . . . . 535
Adding Objects to an Object Class . . . . . 535
Locking Object Classes . . . . . . . . . 535
Storing Object Classes and Objects . . . . . 536
ODM Descriptors . . . . . . . . . . . . 537
ODM Terminal Descriptors . . . . . . . . 538
ODM Link Descriptor . . . . . . . . . 538
ODM Method Descriptor . . . . . . . . 540
ODM Object Searches . . . . . . . . . . 541
Descriptor Names in ODM Predicates . . . . 542
Comparison Operators in ODM Predicates . . 542
LIKE Comparison Operator . . . . . . . 542
Constants in ODM Predicates . . . . . . . 543
AND Logical Operator for Predicates . . . . 544
List of ODM Commands and Subroutines . . . . 544
Commands . . . . . . . . . . . . . 544
Subroutines . . . . . . . . . . . . . 545
ODM Example Code and Output. . . . . . . 545
ODM Example Input Code for Creating Object
Classes . . . . . . . . . . . . . . 546
ODM Example Output for Object Class
Definitions . . . . . . . . . . . . . 547
ODM Example Code for Adding Objects to
Object Classes . . . . . . . . . . . . 548
Chapter 18. sed Program Information 551
Manipulating Strings with sed. . . . . . . . 551
Starting the Editor. . . . . . . . . . . 551
How sed Works . . . . . . . . . . . 551
Using Regular Expressions . . . . . . . . 552
Using the sed Command Summary . . . . . 552
Using Text in Commands . . . . . . . . 556
Using String Replacement . . . . . . . . 556
Chapter 19. Shared Libraries, Shared
Memory, and The malloc Subsystem . 559
Shared Objects and Runtime Linking . . . . . 559
Operation of the Runtime Linker . . . . . . 560
Creating a Shared Object with Runtime Linking
Enabled . . . . . . . . . . . . . . 561
Shared Libraries and Lazy Loading . . . . . . 562
Lazy Loading Execution Tracing . . . . . . 563
Creating a Shared Library . . . . . . . . . 563
Prerequisite Tasks . . . . . . . . . . . 563
Procedure . . . . . . . . . . . . . 564
Program Address Space Overview . . . . . . 565
System Memory Architecture Introduction. . . 566
x General Programming Concepts
The Physical Address Space of 32-bit Systems 566
The Physical Address Space of 64-bit Systems 567
Segment Register Addressing . . . . . . . 567
Paging Space . . . . . . . . . . . . 568
Memory Management Policy . . . . . . . 568
Memory Allocation . . . . . . . . . . 569
Understanding Memory Mapping . . . . . . 569
mmap Comparison with shmat . . . . . . 570
mmap Compatibility Considerations. . . . . 572
Using the Semaphore Subroutines . . . . . 572
Mapping Files with the shmat Subroutine . . . 573
Mapping Shared Memory Segments with the
shmat Subroutine . . . . . . . . . . . 574
Creating a Mapped Data File with the shmat
Subroutine . . . . . . . . . . . . . . 574
Prerequisite Condition . . . . . . . . . 574
Procedure . . . . . . . . . . . . . 574
Creating a Copy-On-Write Mapped Data File with
the shmat Subroutine. . . . . . . . . . . 575
Prerequisite Condition . . . . . . . . . 575
Procedure . . . . . . . . . . . . . 575
Creating a Shared Memory Segment with the
shmat Subroutine . . . . . . . . . . . . 576
Prerequisite Tasks or Conditions . . . . . . 576
Procedure . . . . . . . . . . . . . 576
System Memory Allocation Using the malloc
Subsystem . . . . . . . . . . . . . . 576
Working with the Heap . . . . . . . . . 577
Working with the Heap . . . . . . . . . 577
Understanding System Allocation Policy . . . 578
Understanding the Version 3.2/Version 4.1
Allocation Policy . . . . . . . . . . . 578
Understanding the Version 3.1 Allocation Policy 579
User Defined Malloc Replacement . . . . . . 581
Enablement . . . . . . . . . . . . . 583
32/64bit Considerations . . . . . . . . . 583
Thread Considerations . . . . . . . . . 583
Limitations . . . . . . . . . . . . . 584
Error Reporting . . . . . . . . . . . 584
Paging Space Programming Requirements . . . . 584
List of Memory Manipulation Services . . . . . 585
List of Memory Mapping Services . . . . . . 586
Chapter 20. Packaging Software for
Installation . . . . . . . . . . . . 587
Installation Procedure Requirements. . . . . . 587
Package Control Information Requirements . . . 587
Package Partitioning Requirements . . . . . . 588
Software Product Packaging Parts . . . . . . 588
Sample File System Guide for Package
Partitioning . . . . . . . . . . . . . 588
Format of a Software Package . . . . . . . . 589
Package and Fileset Naming Conventions . . . . 589
Fileset Extension Naming Conventions . . . . 589
Special Naming Considerations for Device
Driver Packaging . . . . . . . . . . . 590
Special Naming Considerations for Message
Catalog Packaging. . . . . . . . . . . 590
File Names . . . . . . . . . . . . . 590
Fileset Revision Level Identification . . . . . . 591
Fileset Level Overview . . . . . . . . . 591
Fileset Level Rules and Conventions for AIX
Version 4.1-Formatted Filesets . . . . . . . 591
Compatibility Information For Version
3.2-Formatted Fileset Updates . . . . . . . 592
Contents of a Software Package . . . . . . . 592
Example Contents of a Software Package . . . 593
The lpp_name Package Information File . . . . 594
Requisite Information Section . . . . . . . 596
Size Information Section. . . . . . . . . 600
Supersede Information Section . . . . . . 601
Fix Information Section . . . . . . . . . 603
The liblpp.a Installation Control Library File . . . 604
Data Files Contained in the liblpp.a File . . . 604
Optional Executable Files Contained in the
liblpp.a File . . . . . . . . . . . . . 605
Optional Executable File Contained in the
Fileset.al File . . . . . . . . . . . . 607
Further Description of Installation Control Files 607
The Fileset.cfgfiles File . . . . . . . . . 607
The Fileset.fixdata File . . . . . . . . . 609
The Fileset.inventory File . . . . . . . . 609
Installation Control Files Specifically for
Repackaged Products . . . . . . . . . . . 611
The Fileset.installed_list File . . . . . . . 611
The Fileset.namelist File . . . . . . . . . 612
The Fileset.rm_inv File . . . . . . . . . 612
Installation Files for Supplemental Disk
Subsystems . . . . . . . . . . . . . . 613
Format of Distribution Media . . . . . . . . 614
Tape . . . . . . . . . . . . . . . 614
CD-ROM . . . . . . . . . . . . . . 614
Diskette . . . . . . . . . . . . . . 615
The Table of Contents File . . . . . . . . . 616
Date and Time Stamp Format . . . . . . . 616
Location Format for Tape and Diskette . . . . 616
The installp Processing of Product Packages . . . 617
Processing for the Apply Operation . . . . . 618
Processing for the Reject and Cleanup
Operations . . . . . . . . . . . . . 621
Processing for the Remove Operation . . . . 622
The Installation Status File . . . . . . . . 623
Installation Commands Used During Installation
and Update Processing . . . . . . . . . . 624
Chapter 21. Documentation Library
Service . . . . . . . . . . . . . . 625
Language Support. . . . . . . . . . . . 626
Writing your HTML Documents . . . . . . . 626
Calling the Documentation Library Service From
Your Documentation . . . . . . . . . . . 627
Section A: Calling the Documentation Library
Service From Your Documentation (for versions
AIX Version 4.3, AIX Version 4.3.1 and AIX
Version 4.3.2) . . . . . . . . . . . . 628
Section B: Calling the Documentation Library
Service From Your Documentation (for AIX
Version 4.3.3 and later) . . . . . . . . . 639
Section C: Calling the Documentation Library
Service From Your Documentation (for all
versions of AIX) . . . . . . . . . . . 647
Creating Indexes of your Documentation . . . . 647
Contents xi
Requirements . . . . . . . . . . . . 647
Building the Indexes . . . . . . . . . . 648
Removing Indexes of your Documentation . . . 657
Packaging your Application’s Documentation . . 657
Include a Search Index . . . . . . . . . 657
Register your Documentation . . . . . . . 659
Create an install package . . . . . . . . 659
Chapter 22. Software Vital Product
Data (SWVPD) . . . . . . . . . . . 661
Object Classes . . . . . . . . . . . . . 661
Files . . . . . . . . . . . . . . . . 662
Chapter 23. Source Code Control
System (SCCS) . . . . . . . . . . 663
Introduction to SCCS . . . . . . . . . . . 663
Delta Table in SCCS files . . . . . . . . . 663
Control and Tracking Flags in SCCS Files . . . . 664
Body of an SCCS file . . . . . . . . . . . 664
SCCS Flag and Parameter Conventions . . . . . 664
Creating, Editing, and Updating an SCCS File . . 665
Creating an SCCS File . . . . . . . . . 665
Editing an SCCS file . . . . . . . . . . 665
Updating an SCCS File . . . . . . . . . 666
Controlling and Tracking SCCS File Changes . . . 666
Controlling Access to SCCS files . . . . . . 666
Tracking Changes to an SCCS File . . . . . 667
Detecting and Repairing Damaged SCCS Files . . 667
Procedure . . . . . . . . . . . . . 668
List of Additional SCCS Commands . . . . . . 668
Chapter 24. Subroutines, Example
Programs, and Libraries. . . . . . . 669
128-Bit Long Double Floating-Point Data Type . . 670
Compiling Programs that Use the 128-bit Long
Double Data Type . . . . . . . . . . . 670
Compliance with IEEE 754 Standard. . . . . 670
Implementing the 128-Bit Long Double Format 671
Values of Numeric Macros . . . . . . . . 671
List of Character Manipulation Subroutines . . . 672
Character Testing . . . . . . . . . . . 672
Character Translation. . . . . . . . . . 672
Miscellaneous Character Manipulation . . . . 673
List of Executable Program Creation Subroutines 673
List of Files and Directories Subroutines . . . . 674
Controlling Files . . . . . . . . . . . 674
Working with Directories . . . . . . . . 674
Manipulating File Systems . . . . . . . . 675
List of FORTRAN BLAS Level 1: Vector-Vector
Subroutines . . . . . . . . . . . . . . 675
List of FORTRAN BLAS Level 2: Matrix-Vector
Subroutines . . . . . . . . . . . . . . 676
List of FORTRAN BLAS Level 3: Matrix-Matrix
Subroutines . . . . . . . . . . . . . . 676
List of Numerical Manipulation Subroutines . . . 677
List of Long Long Integer Numerical Manipulation
Subroutines . . . . . . . . . . . . . . 678
List of 128-Bit Long Double Numerical
Manipulation Subroutines . . . . . . . . . 678
List of Processes Subroutines . . . . . . . . 679
Process Initiation . . . . . . . . . . . 679
Process Suspension . . . . . . . . . . 679
Process Termination . . . . . . . . . . 679
Process and Thread Identification . . . . . 680
Process Accounting . . . . . . . . . . 680
Process Resource Allocation . . . . . . . 680
Process Prioritization . . . . . . . . . . 680
Process and Thread Synchronization. . . . . 680
Process Signals and Masks . . . . . . . . 681
Process Messages . . . . . . . . . . . 681
List of Multi-threaded Programming Subroutines 681
List of Programmer’s Workbench Library
Subroutines . . . . . . . . . . . . . . 681
File . . . . . . . . . . . . . . . . 682
List of Security and Auditing Subroutines . . . . 683
Access Control Subroutines. . . . . . . . 683
Auditing Subroutines. . . . . . . . . . 683
Identification and Authentication Subroutines 683
Process Subroutines . . . . . . . . . . 684
List of String Manipulation Subroutines . . . . 684
Programming Example for Manipulating
Characters . . . . . . . . . . . . . . 685
Searching and Sorting Example Program . . . . 687
List of Operating System Libraries . . . . . . 689
librs2.a Library . . . . . . . . . . . . . 690
General-Use sqrt and itrunc Subroutines . . . 690
POWER2-Specific sqrt and itrunc Subroutines 690
Chapter 25. System Management
Interface Tool (SMIT) . . . . . . . . 693
SMIT Screen Types . . . . . . . . . . . 693
Menu Screens . . . . . . . . . . . . 694
Selector Screens . . . . . . . . . . . 695
Dialog Screens . . . . . . . . . . . . 696
SMIT Object Classes . . . . . . . . . . . 696
The SMIT Database . . . . . . . . . . 702
SMIT Aliases and Fast Paths . . . . . . . . 702
SMIT Information Command Descriptors . . . . 706
The cmd_to_discover Descriptor . . . . . . 707
The cmd_to_*_postfix Descriptors . . . . . 708
SMIT Command Generation and Execution . . . 709
Generating Dialog Defined Tasks . . . . . . 709
Executing Dialog Defined Tasks . . . . . . 710
Adding Tasks to the SMIT Database . . . . . . 711
Procedure . . . . . . . . . . . . . 711
Debugging SMIT Database Extensions . . . . . 712
Prerequisite Tasks or Conditions . . . . . . 712
Procedure . . . . . . . . . . . . . 712
Creating SMIT Help Information for a New Task 712
Man Pages Method . . . . . . . . . . 713
Message Catalog Method . . . . . . . . 713
Softcopy Libraries Method . . . . . . . . 714
sm_menu_opt (SMIT Menu) Object Class . . . . 714
The sm_menu_opt Object Class Used for Aliases 715
sm_name_hdr (SMIT Selector Header) Object Class 716
sm_cmd_opt (SMIT Dialog/Selector Command
Option) Object Class . . . . . . . . . . . 719
sm_cmd_hdr (SMIT Dialog Header) Object Class 723
SMIT Example Program . . . . . . . . . . 726
xii General Programming Concepts
Chapter 26. System Resource
Controller . . . . . . . . . . . . . 739
Subsystem Interaction with the SRC . . . . . . 739
The SRC and the init Command . . . . . . . 740
Compiling Programs to Interact With the srcmstr
Daemon . . . . . . . . . . . . . . . 740
SRC Operations . . . . . . . . . . . . 740
SRC Capabilities . . . . . . . . . . . . 740
SRC Objects . . . . . . . . . . . . . . 741
Subsystem Object Class . . . . . . . . . 741
Subserver Type Object Class . . . . . . . 744
Notify Object Class . . . . . . . . . . 745
SRC Communication Types. . . . . . . . . 746
Signals Communication . . . . . . . . . 747
Sockets Communication . . . . . . . . . 748
IPC Message Queue Communication . . . . 749
Programming Subsystem Communication with the
SRC . . . . . . . . . . . . . . . . 750
Programming Subsystems to Receive SRC
Requests . . . . . . . . . . . . . . 750
Programming Subsystems to Process SRC
Request Packets . . . . . . . . . . . 752
Processing SRC Status Requests . . . . . . 753
Programming Subsystems to Send Reply
Packets . . . . . . . . . . . . . . 754
Programming Subsystems to Return SRC Error
Packets . . . . . . . . . . . . . . 755
Responding to Trace Requests . . . . . . . 756
Responding to Refresh Requests . . . . . . 756
Defining Your Subsystem to the SRC . . . . . 757
List of Additional SRC Subroutines . . . . . . 757
Chapter 27. Trace Facility . . . . . . 759
Trace Facility Commands . . . . . . . . . 759
Trace Facility Calls and Subroutines . . . . . . 760
Trace Facility Files . . . . . . . . . . . . 761
Trace Event Data . . . . . . . . . . . . 761
Trace Hook Identifiers . . . . . . . . . 761
Hook Types . . . . . . . . . . . . . 761
Trace Facility Generic Trace Channels . . . . . 761
Trace Hook IDs: 001 through 10A . . . . . . 762
001 : HKWD TRACE TRCON . . . . . . . 762
002 : HKWD TRACE TRCOFF. . . . . . . 762
003 : HKWD TRACE HEADER . . . . . . 762
004 : HKWD TRACE NULL . . . . . . . 762
005 : HKWD TRACE LWRAP . . . . . . . 763
006 : HKWD TRACE TWRAP . . . . . . . 763
007 : HKWD TRACE UNDEFINED . . . . . 763
100 : HKWD KERN FLIH . . . . . . . . 763
101 : HKWD KERN SVC . . . . . . . . 764
102 : HKWD KERN SLIH . . . . . . . . 764
103 : HKWD KERN SLIHRET . . . . . . . 764
104 : HKWD KERN SYSCRET . . . . . . . 764
105 : HKWD KERN LVM . . . . . . . . 764
106 : HKWD KERN DISPATCH . . . . . . 766
107 : HKWD LFS LOOKUP. . . . . . . . 766
108 : HKWD SYSC LFS . . . . . . . . . 766
10A : HKWD KERN PFS . . . . . . . . 767
Trace Hook IDs: 10B through 14E. . . . . . . 767
10B : HKWD KERN LVMSIMP . . . . . . 768
10C : HKWD KERN IDLE . . . . . . . . 769
10F : HKWD KERN EOF . . . . . . . . 769
110 : HKWD KERN STDERR . . . . . . . 769
112 : HKWD KERN LOCK . . . . . . . . 770
113 : HKWD KERN UNLOCK . . . . . . . 770
114 : HKWD KERN LOCKALLOC . . . . . 770
115 : HKWD KERN SETRECURSIVE . . . . 771
116 : HKWD KERN XMALLOC . . . . . . 771
117 : HKWD KERN XMFREE . . . . . . . 771
118 : HKWD KERN FORKCOPY . . . . . . 771
119 : HKWD KERN SENDSIGNAL . . . . . 771
11A : HKWD KERN RCVSIGNAL . . . . . 772
11B : HKWD KERN LOCKL . . . . . . . 772
11C : HKWD KERN P SLIH . . . . . . . 772
11D : HKWD KERN SIG SLIH. . . . . . . 772
11E : HKWD KERN ISSIG . . . . . . . . 772
11F : HKWD KERN SORQ . . . . . . . . 772
120 : HKWD SYSC ACCESS . . . . . . . 773
121 : HKWD SYSC ACCT . . . . . . . . 773
122 : HKWD SYSC ALARM . . . . . . . 773
12E : HKWD SYSC CLOSE . . . . . . . . 773
134 : HKWD SYSC EXECVE . . . . . . . 773
135 : HKWD SYSC EXIT. . . . . . . . . 774
139 : HKWD SYSC FORK . . . . . . . . 774
145 : HKWD SYSC GETPGRP . . . . . . . 774
146 : HKWD SYSC GETPID . . . . . . . 774
147 : HKWD SYSC GETPPID . . . . . . . 774
14C : HKWD SYSC IOCTL . . . . . . . . 774
14E : HKWD SYSC KILL . . . . . . . . 775
Trace Hook IDs: 152 through 19C. . . . . . . 775
152 : HKWD SYSC LOCKF . . . . . . . . 775
154 : HKWD SYSC LSEEK . . . . . . . . 775
15F : HKWD SYSC PIPE. . . . . . . . . 776
160 : HKWD SYSC PLOCK . . . . . . . . 776
169 : HKWD SYSC SBREAK . . . . . . . 776
16E : HKWD SYSC SETPGRP . . . . . . . 776
16F : HKWD SYSC SETPRIO . . . . . . . 777
180 : HKWD SYSC SIGACTION . . . . . . 777
181 : HKWD SYSC SIGCLEANUP . . . . . 777
18E : HKWD SYSC TIMES . . . . . . . . 777
18F : HKWD SYSC ULIMIT . . . . . . . 778
195 : HKWD SYSC USRINFO . . . . . . . 778
19B : HKWD SYSC WAIT . . . . . . . . 778
Trace Hook IDs: 1A4 through 1BF . . . . . . 778
1A4 : HKWD SYSC GETRLIMIT . . . . . . 779
1A5 : HKWD SYSC SETRLIMIT . . . . . . 779
1A6 : HKWD SYSC GETRUSAGE . . . . . 779
1A7 : HKWD SYSC GETPRIORITY . . . . . 779
1A8 : HKWD SYSC SETPRIORITY . . . . . 780
1A9 : HKWD SYSC ABSINTERVAL . . . . . 780
1AA : HKWD SYSC GETINTERVAL. . . . . 780
1AB : HKWD SYSC GETTIMER . . . . . . 780
1AC : HKWD SYSC INCINTERVAL . . . . . 780
1AD : HKWD SYSC RESTIMER . . . . . . 780
1AE : HKWD SYSC RESABS . . . . . . . 781
1AF : HKWD SYSC RESINC . . . . . . . 781
1B0 : HKWD VMM ASSIGN . . . . . . . 781
1B1 : HKWD VMM DELETE . . . . . . . 782
1B2 : HKWD VMM PGEXCT . . . . . . . 782
1B3 : HKWD VMM PROTEXCT . . . . . . 782
1B4 : HKWD VMM LOCKEXCT . . . . . . 782
Contents xiii
1B5 : HKWD VMM RECLAIM . . . . . . 783
1B6 : HKWD VMM GETPARENT . . . . . 783
1B7 : HKWD VMN COPYPARENT . . . . . 783
1B8 : HKWD VMN VMAP . . . . . . . . 783
1B9 : HKWD VMN ZFOD . . . . . . . . 784
1BA : HKWD VMN SIO . . . . . . . . . 784
1BB : HKWD VMM SEGCREATE. . . . . . 784
1BC : HKWD VMM SEGDELETE. . . . . . 785
1BD : HKWD VMM DALLOC. . . . . . . 785
1BE : HKWD VMM PFEND . . . . . . . 785
1BF : HKWD VMM EXCEPT . . . . . . . 785
Trace Hook IDs: 1C8 through 1CE . . . . . . 786
1C8 : HKWD DD PPDD . . . . . . . . . 786
1C9 : HKWD DD CDDD . . . . . . . . 787
1CA : HKWD DD TAPEDD . . . . . . . 788
1CD : HKWD DD ENTDD . . . . . . . . 789
1CE : HKWD DD TOKDD . . . . . . . . 790
Trace Hook IDs: 1CF through 211. . . . . . . 790
1CF : HKWD DD C327DD . . . . . . . . 790
1D1 : HKWD RAS ERRLG . . . . . . . . 791
1D2 : HKWD RAS DUMP . . . . . . . . 792
1F0 : HKWD SYSC SETTIMER . . . . . . 794
200 : HKWD KERN RESUME . . . . . . . 794
20E: HKWD KERN LOCKL . . . . . . . 794
20F: HKWD KERN UNLOCKL . . . . . . 794
211 : HKWD NFS VOPSRW . . . . . . . 794
Trace Hook IDs: 212 through 220 . . . . . . . 795
212 : HKWD NFS VOPS. . . . . . . . . 795
213 : HKWD NFS RFSRW . . . . . . . . 796
214 : HKWD NFS RFS . . . . . . . . . 797
215 : HKWD NFS DISPATCH . . . . . . . 798
216 : HKWD NFS CALL. . . . . . . . . 799
218 : HKWD RPC LOCKD . . . . . . . . 799
220 : HKWD DD FDDD . . . . . . . . . 800
Trace Hook IDs: 221 through 223 . . . . . . . 801
221 : HKWD DD SCDISKDD . . . . . . . 801
222 : HKWD DD BADISKDD . . . . . . . 803
223 : HKWD DD SCSIDD . . . . . . . . 804
Trace Hook IDs: 224 through 226 . . . . . . . 806
224 : HKWD DD MPQPDD . . . . . . . 806
225 : HKWD DD X25DD . . . . . . . . 809
226 : HKWD DD GIO . . . . . . . . . 813
Trace Hook IDs: 230 through 233 . . . . . . . 813
230: HKWD PTHREAD MUTEX LOCK. . . . 813
231: HKWD PTHREAD MUTEX UNLOCK . . 814
232: HKWD PTHREAD SPIN LOCK . . . . 814
233: HKWD PTHREAD SPIN UNLOCK . . . 814
Trace Hook IDs: 240 through 252 . . . . . . . 814
240 : HKWD SYSX DLC START . . . . . . 814
241 : HKWD SYSX DLC HALT . . . . . . 815
242 : HKWD SYSX DLC TIMER . . . . . . 816
243 : HKWD SYSX DLC XMIT . . . . . . 816
244 : HKWD SYSX DLC RECV . . . . . . 817
245 : HKWD SYSX DLC PERF. . . . . . . 817
246 : HKWD SYSX DLC MONITOR . . . . . 818
251 : HKWD NETERR . . . . . . . . . 819
252 : HKWD SYSC TCPIP . . . . . . . . 821
Trace Hook IDs: 253 through 25A . . . . . . 822
253 : HKWD SOCKET . . . . . . . . . 822
254 : HKWD MBUF . . . . . . . . . . 823
255 : HKWD IFEN. . . . . . . . . . . 824
256 : HKWD IFTR . . . . . . . . . . . 825
257 : HKWD IFET . . . . . . . . . . . 826
258 : HKWD IFXT . . . . . . . . . . . 827
259 : HKWD IFSL . . . . . . . . . . . 828
25A : HKWD TCPDBG . . . . . . . . . 829
Trace Hook IDs: 271 through 280 . . . . . . . 830
271: HKWD SNA API . . . . . . . . . 830
280: HKWD HIA . . . . . . . . . . . 832
Trace Hook IDs: 301 through 315 . . . . . . . 839
301: HKWD KERN ASSERTWAIT . . . . . 839
302: HKWD KERN CLEARWAIT . . . . . . 840
303: HKWD KERN THREADBLOCK . . . . 840
304: HKWD KERN EMPSLEEP . . . . . . 840
305: HKWD KERN EWAKEUPONE . . . . . 840
306: HKWD SYSC CRTHREAD . . . . . . 841
307: HKWD KERN KTHREADSTART . . . . 841
308 : HKWD SYSC TERMTHREAD . . . . . 841
309 : HKWD KERN KSUSPEND . . . . . . 841
310 : HKWD SYSC THREADSETSTATE . . . 841
311 : HKWD SYSC THREADTERM ACK . . . 842
312 : HKWD SYSC THREADSETSCHED . . . 842
313 : HKWD KERN TIDSIG . . . . . . . 842
314 : HKWD KERN WAITLOCK . . . . . . 843
315 : HKWD KERN WAKEUPLOCK . . . . 843
Trace Hook IDs: 3C5 through 3E2 . . . . . . 843
3c5 : HKWD SYSC IPCACCESS . . . . . . 843
3c6 : HKWD SYSC IPCGET . . . . . . . 843
3c7 : HKWD SYSC MSGCONV . . . . . . 844
3c8 : HKWD SYSC MSGCTL . . . . . . . 844
3c9 : HKWD SYSC MSGGET . . . . . . . 844
3ca : HKWD SYSC MSGRCV . . . . . . . 844
3cb : HKWD SYSC MSGSELECT . . . . . . 845
3cc : HKWD SYSC MSGSND . . . . . . . 845
3cd : HKWD SYSC MSGXRCV . . . . . . 845
3ce : HKWD SYSC SEMCONV . . . . . . 845
3cf : HKWD SYSC SEMCTL . . . . . . . 845
3d0 : HKWD SYSC SEMGET . . . . . . . 846
3d1 : HKWD SYSC SEMOP . . . . . . . 846
3d2 : HKWD SYSC SEM. . . . . . . . . 846
3d3 : HKWD SYSC SHMAT . . . . . . . 846
3d4 : HKWD SYSC SHMCONV . . . . . . 847
3d5 : HKWD SYSC SHMCTL . . . . . . . 847
3d6 : HKWD SYSC SHMDT . . . . . . . 847
3d7 : HKWD SYSC SHMGET . . . . . . . 847
3d8 : HKWD SYSC MADVISE. . . . . . . 847
3d9 : HKWD SYSC MINCORE . . . . . . 848
3da : HKWD SYSC MMAP . . . . . . . . 848
3db : HKWD SYSC MPROTECT . . . . . . 848
3dc : HKWD SYSC MSYNC . . . . . . . 848
3dd : HKWD SYSC MUNMAP . . . . . . 848
3de : HKWD SYSC MVALID . . . . . . . 849
3df : HKWD SYSC MSEM_INIT . . . . . . 849
3e0 : HKWD SYSC MSEM_LOCK . . . . . 849
3e1 : HKWD SYSC MSEM_REMOVE . . . . 849
3e2 : HKWD SYSC MSEM_UNLOCK . . . . 850
Trace Hook IDs: 401 . . . . . . . . . . . 850
401 : HKWD TTY TTY . . . . . . . . . 850
Trace Hook IDs: 402 . . . . . . . . . . . 855
402 : HKWD TTY PTY . . . . . . . . . 855
Trace Hook IDs: 403 . . . . . . . . . . . 860
403 : HKWD TTY RS . . . . . . . . . . 860
xiv General Programming Concepts
Trace Hook IDs: 404 . . . . . . . . . . . 865
404 : HKWD TTY LION . . . . . . . . . 865
Trace Hook IDs: 405 . . . . . . . . . . . 870
405 : HKWD TTY HFT . . . . . . . . . 870
Trace Hook IDs: 406 . . . . . . . . . . . 875
406 : HKWD TTY RTS . . . . . . . . . 875
Trace Hook IDs: 407 . . . . . . . . . . . 880
407 : HKWD TTY XON . . . . . . . . . 880
Trace Hook IDs: 408 . . . . . . . . . . . 885
408 : HKWD TTY DTR . . . . . . . . . 885
Trace Hook IDs: 409 . . . . . . . . . . . 890
409 : HKWD TTY DTRO . . . . . . . . 890
Trace Hook IDs: 411 through 418 . . . . . . . 894
411: HKWD STTY STRTTY . . . . . . . . 894
412: HKWD STTY LDTERM . . . . . . . 895
413: HKWD STTY SPTR . . . . . . . . . 896
414: HKWD STTY NLS . . . . . . . . . 898
415: HKWD STTY PTY . . . . . . . . . 900
416: HKWD STTY RS. . . . . . . . . . 901
417: HKWD STTY LION. . . . . . . . . 905
418: HKWD STTY CXMA . . . . . . . . 909
Trace Hook IDs: 460 through 46E . . . . . . . 913
460: HKWD KERN ASSERTWAIT . . . . . 913
461: HKWD KERN CLEARWAIT . . . . . . 913
462: HKWD KERN THREADBLOCK . . . . 914
463: HKWD KERN EMPSLEEP . . . . . . 914
464: HKWD KERN EWAKEUPONE . . . . . 914
465: HKWD SYSC CRTHREAD . . . . . . 914
466: HKWD KERN KTHREADSTART . . . . 915
467: HKWD SYSC TERMTHREAD . . . . . 915
468: HKWD KERN KSUSPEND . . . . . . 915
469: HKWD SYSC THREADSETSTATE . . . . 915
46A: HKWD SYSC THREADTERM ACK . . . 916
46B: HKWD SYSC THREADSETSCHED . . . 916
46C: HKWD KERN TIDSIG . . . . . . . 916
46D: HKWD KERN WAITLOCK . . . . . . 916
46E: HKWD KERN WAKEUPLOCK . . . . . 916
Chapter 28. tty Subsystem. . . . . . 919
TTY Subsystem Objectives . . . . . . . . . 919
tty Subsystem Modules . . . . . . . . . . 919
tty Drivers . . . . . . . . . . . . . 919
Line Disciplines . . . . . . . . . . . 920
Converter Modules . . . . . . . . . . 920
TTY Subsystem Structure . . . . . . . . . 920
Common Services . . . . . . . . . . . . 922
Hardware Control Services . . . . . . . . 923
Flow Control Services . . . . . . . . . 923
Terminal Information and Control . . . . . 923
Window and Terminal Size Services . . . . . 923
Process Group Management Services . . . . 924
Buffer Size Operations . . . . . . . . . 924
Synchronization . . . . . . . . . . . . 924
tty Revision History . . . . . . . . . . . 924
tty Structure. . . . . . . . . . . . . 924
Unsupported ioctl Operations . . . . . . . 925
Supported ioctl Operations . . . . . . . . 926
Line Discipline Module (ldterm) . . . . . . . 926
Terminal Parameters . . . . . . . . . . 926
Process Group Session Management (Job
Control) . . . . . . . . . . . . . . 927
Terminal Access Control . . . . . . . . . 927
Reading Data and Input Processing . . . . . 927
Writing Data and Output Processing . . . . 930
Modem Management. . . . . . . . . . 930
Closing a Terminal Device File . . . . . . 930
Converter Modules . . . . . . . . . . . 930
NLS Module . . . . . . . . . . . . 930
SJIS Modules . . . . . . . . . . . . 931
TTY Drivers . . . . . . . . . . . . . . 931
Asynchronous Line Drivers. . . . . . . . 931
Pseudo-Terminal Driver . . . . . . . . . 932
Chapter 29. High-Resolution Time
Measurements Using PowerPC Time
Base or POWER Real-Time Clock. . . 933
Chapter 30. Loader Domains . . . . . 935
Using Loader Domains . . . . . . . . . . 935
Creating/Deleting Loader Domains . . . . . . 937
Chapter 31. Power
Management-Aware Application
Program . . . . . . . . . . . . . 939
Index . . . . . . . . . . . . . . . 941
Readers’ Comments We’d Like to
Hear from You . . . . . . . . . . . 953
Contents xv
xvi General Programming Concepts
About This Book
This book introduces you to the programming tools and interfaces available for
writing and debugging application programs using the AIX operating system.
Who Should Use This Book
This book is intended for programmers who write and debug application programs
on the AIX operating system. Users of this book should be familiar with the C
programming language and AIX usage (entering commands, creating and deleting
files, editing files, and moving around in the file system).
How to Use This Book
Highlighting
The following highlighting conventions are used in this book:
Bold Identifies commands, subroutines, keywords, files, structures, directories, and
other items whose names are predefined by the system. Also identifies
graphical objects such as buttons, labels, and icons that the user selects.
Italics Identifies parameters whose actual names or values are to be supplied by the
user.
Monospace Identifies examples of specific data values, examples of text similar to what
you might see displayed, examples of portions of program code similar to
what you might write as a programmer, messages from the system, or
information you should actually type.
ISO 9000
ISO 9000 registered quality systems were used in the development and
manufacturing of this product.
AIX 32-Bit and 64-Bit Support for the UNIX98 Specification
Beginning with AIX Version 4.3, the operating system is designed to support the
X/Open UNIX98 Specification for portability of UNIX-based operating systems.
Many new interfaces, and some current ones, have been added or enhanced to
meet this specification. Making AIX Version 4.3 even more open and portable for
applications.
At the same time, compatibility with previous AIX releases is preserved. This is
accomplished by the creation of a new environment variable, which can be used to
set the system environment on a per-system, per-user, or per-process basis.
To determine the proper way to develop a UNIX98-portable application, you may
need to refer to the X/Open UNIX98 Specification, which can be obtained on a
CD-ROM by ordering the printed copy of AIX Version 4.3 Commands Reference,
order number SBOF-1877, or by ordering Go Solo: How to Implement and Go Solo
with the Single Unix Specification, order number SR28-5705, a book which includes
the X/Open UNIX98 Specification on a CD-ROM.
© Copyright IBM Corp. 1997, 1999 xvii
Related Publications
The following books contain information about or related to writing programs:
v AIX and Related Products Documentation Overview, order number SC23-2456.
v AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts, order
number SC23-4125.
v AIX Version 4.3 Communications Programming Concepts, order number SC23-4124.
v AIX Version 4.3 AIXwindows Programming Guide, available on the AIX Version 4.3
Base Documentation CD only.
v AIX Versions 3.2 and 4 Performance Tuning Guide, order number SC23-2365.
v AIX Version 4.3 System Management Guide: Operating System and Devices, order
number SC23-4126.
v AIX Version 4.3 System Management Guide: Communications and Networks, order
number SC23-4127.
v AIX Version 4.3 Commands Reference, order number SBOF-1877.
v AIX Version 4.3 Technical Reference, order number SBOF-1878.
v AIX Version 4.3 Files Reference, order number SC23-4168.
v AIX Version 4.3 Assembler Language Reference, available on the AIX Version 4.3
Extended Documentation CD only.
v AIX Version 4.3 INed Editor User’s Guide, available on the AIX Version 4.3 Base
Documentation CD only.
Bach, Maurice. The Design of the UNIX Operating System. Englewood, NJ:
Prentice-Hall Press,1986.
Leffler, Samuel J., McKusic, Marshall Kirk, Karels, Michael J., Quarterman, John S.
The Design and Implementation of the 4.3 BSD UNIX Operating System. USA:
Addison-Wesley Publishing Company, 1989.
Kernighan, Brian W., Pike, Rob. The UNIX Programming Environment. Englewood
Cliffs, NJ: Prentice-Hall Press, 1984.
Levine, John R., Tony Mason, and Doug Brown. lex & yacc. Sebastopol, CA:
O’Reilly & Associates, 1992.
Dougherty, Dale. sed & awk. Sebastopol, CA: O’Reilly & Associates, 1990.
Oram, Andrew, and Steve Talbott. Managing Projects with make. Sebastopol, CA:
O’Reilly & Associates, 1991.
X/Open Company, Ltd. and Prentice Hall, Inc. Go Solo: How to Implement and Go
Solo with the Single Unix Specification. Order Number SR28-5705.
Ordering Publications
You can order publications from your sales representative or from your point of
sale.
To order additional copies of this book, use order number SC23-4128.
Use AIX and Related Products Documentation Overview for information on related
publications and how to obtain them.
xviii General Programming Concepts
Chapter 1. Tools and Utilities
This chapter provides an overview of the operating system tools and utilities that
you can use to develop C language programs.
The AIX Operating System provides many tools to help you develop C language
programs. To access these tools, you enter a command on the command line. The
tools provide help in the following programming areas:
v “Entering a Program into the System”
v “Checking a Program”
v “Compiling and Linking a Program”
v “Correcting Errors in a Program” on page 2
v “Building and Maintaining a Program” on page 2
“Subroutines” on page 3 and “Shell Commands” on page 3 are provided for use in
a C language program.
Entering a Program into the System
The system has a line editor called ed for use in entering a program into a file. The
system also has the full-screen editors INed (or e) and vi. These editors display
one full screen of data at a time and allow interactive editing of a file.
Checking a Program
The following commands allow you to check the format of a program for
consistency and accuracy:
lint Checks for syntax and data type errors in a C language source program. The lint
command checks these areas of a program more carefully than the C language
compiler does, and displays many messages that point out possible problems.
cb Reformats a C language source program into a consistent format that uses
indentation levels to show the structure of the program.
cflow Generates a diagram of the logic flow of a C language source program.
cxref Generates a list of all external references for each module of a C language source
program, including where the reference is resolved (if it is resolved in the
program).
Compiling and Linking a Program
To make source code into a program that the system can run, you need to process
the source file with a compiler program and a linkage editor.
A compiler is a program that reads program text from a file and changes the
programming language in that file to a form that the system understands. The
linkage editor connects program modules together and determines how to put the
finished program into memory. To create this final form of the program, the system
does the following:
v If a file contains compiler source code, the compiler translates it into object code.
v If a file contains assembler language, the assembler translates it into object code.
© Copyright IBM Corp. 1997, 1999 1
v The linkage editor links the object files created in the previous step with any
other object files specified in the compiler command.
Other programming languages available for use on the operating system include
the FORTRAN, Pascal, and Assembler languages. Refer to documentation on these
programming languages for information on compiling and linking programs
written in them.
You can write parts of a program in different languages and have one main routine
call and start the separate routines to execute, or use the cc program to both
assemble and link the program.
Correcting Errors in a Program
The following debugging tools are available for use:
v “dbx Symbolic Debug Program Overview” on page 70 symbolic debugger can be
used to debug programs written in C language, Pascal, FORTRAN, and
Assembler language.
v “adb Debug Program Overview” on page 37 debugger provides subcommands
to examine, debug, and repair executable binary files and to examine non-ASCII
data files.
v Kernel Debug Program can help to determine errors in code running in the
kernel. The primary application of this debugger is debugging device drivers.
v The Trace Facility helps isolate system problems by monitoring selected system
events.
When syntax errors or parameter naming inconsistencies are discovered in a
program file, a text editor or string-searching and string-editing programs can be
used to locate and change strings in the file. String-searching and string-editing
programs include the grep, sed, and awk commands. To make many changes in
one or more program files, you can include the commands in a shell program and
then run the shell program to locate and change the code in the files.
Building and Maintaining a Program
Two facilities are provided to help you control program changes and build a
program from many source modules. These commands can be particularly useful
in software development environments in which many source modules are
produced.
The make command builds a program from source modules. Since the make
command compiles only those modules changed since the last build, its use can
reduce compilation time when many source modules must be processed.
The Source Code Control System (SCCS) allows you to maintain separate versions
of a program without storing separate, complete copies of each version. (See
“Chapter 23. Source Code Control System (SCCS)” on page 663 for more
information.) The use of SCCS can reduce storage requirements and help in
tracking the development of a project that requires keeping many versions of large
programs.
2 General Programming Concepts
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304
  • Page 305 305
  • Page 306 306
  • Page 307 307
  • Page 308 308
  • Page 309 309
  • Page 310 310
  • Page 311 311
  • Page 312 312
  • Page 313 313
  • Page 314 314
  • Page 315 315
  • Page 316 316
  • Page 317 317
  • Page 318 318
  • Page 319 319
  • Page 320 320
  • Page 321 321
  • Page 322 322
  • Page 323 323
  • Page 324 324
  • Page 325 325
  • Page 326 326
  • Page 327 327
  • Page 328 328
  • Page 329 329
  • Page 330 330
  • Page 331 331
  • Page 332 332
  • Page 333 333
  • Page 334 334
  • Page 335 335
  • Page 336 336
  • Page 337 337
  • Page 338 338
  • Page 339 339
  • Page 340 340
  • Page 341 341
  • Page 342 342
  • Page 343 343
  • Page 344 344
  • Page 345 345
  • Page 346 346
  • Page 347 347
  • Page 348 348
  • Page 349 349
  • Page 350 350
  • Page 351 351
  • Page 352 352
  • Page 353 353
  • Page 354 354
  • Page 355 355
  • Page 356 356
  • Page 357 357
  • Page 358 358
  • Page 359 359
  • Page 360 360
  • Page 361 361
  • Page 362 362
  • Page 363 363
  • Page 364 364
  • Page 365 365
  • Page 366 366
  • Page 367 367
  • Page 368 368
  • Page 369 369
  • Page 370 370
  • Page 371 371
  • Page 372 372
  • Page 373 373
  • Page 374 374
  • Page 375 375
  • Page 376 376
  • Page 377 377
  • Page 378 378
  • Page 379 379
  • Page 380 380
  • Page 381 381
  • Page 382 382
  • Page 383 383
  • Page 384 384
  • Page 385 385
  • Page 386 386
  • Page 387 387
  • Page 388 388
  • Page 389 389
  • Page 390 390
  • Page 391 391
  • Page 392 392
  • Page 393 393
  • Page 394 394
  • Page 395 395
  • Page 396 396
  • Page 397 397
  • Page 398 398
  • Page 399 399
  • Page 400 400
  • Page 401 401
  • Page 402 402
  • Page 403 403
  • Page 404 404
  • Page 405 405
  • Page 406 406
  • Page 407 407
  • Page 408 408
  • Page 409 409
  • Page 410 410
  • Page 411 411
  • Page 412 412
  • Page 413 413
  • Page 414 414
  • Page 415 415
  • Page 416 416
  • Page 417 417
  • Page 418 418
  • Page 419 419
  • Page 420 420
  • Page 421 421
  • Page 422 422
  • Page 423 423
  • Page 424 424
  • Page 425 425
  • Page 426 426
  • Page 427 427
  • Page 428 428
  • Page 429 429
  • Page 430 430
  • Page 431 431
  • Page 432 432
  • Page 433 433
  • Page 434 434
  • Page 435 435
  • Page 436 436
  • Page 437 437
  • Page 438 438
  • Page 439 439
  • Page 440 440
  • Page 441 441
  • Page 442 442
  • Page 443 443
  • Page 444 444
  • Page 445 445
  • Page 446 446
  • Page 447 447
  • Page 448 448
  • Page 449 449
  • Page 450 450
  • Page 451 451
  • Page 452 452
  • Page 453 453
  • Page 454 454
  • Page 455 455
  • Page 456 456
  • Page 457 457
  • Page 458 458
  • Page 459 459
  • Page 460 460
  • Page 461 461
  • Page 462 462
  • Page 463 463
  • Page 464 464
  • Page 465 465
  • Page 466 466
  • Page 467 467
  • Page 468 468
  • Page 469 469
  • Page 470 470
  • Page 471 471
  • Page 472 472
  • Page 473 473
  • Page 474 474
  • Page 475 475
  • Page 476 476
  • Page 477 477
  • Page 478 478
  • Page 479 479
  • Page 480 480
  • Page 481 481
  • Page 482 482
  • Page 483 483
  • Page 484 484
  • Page 485 485
  • Page 486 486
  • Page 487 487
  • Page 488 488
  • Page 489 489
  • Page 490 490
  • Page 491 491
  • Page 492 492
  • Page 493 493
  • Page 494 494
  • Page 495 495
  • Page 496 496
  • Page 497 497
  • Page 498 498
  • Page 499 499
  • Page 500 500
  • Page 501 501
  • Page 502 502
  • Page 503 503
  • Page 504 504
  • Page 505 505
  • Page 506 506
  • Page 507 507
  • Page 508 508
  • Page 509 509
  • Page 510 510
  • Page 511 511
  • Page 512 512
  • Page 513 513
  • Page 514 514
  • Page 515 515
  • Page 516 516
  • Page 517 517
  • Page 518 518
  • Page 519 519
  • Page 520 520
  • Page 521 521
  • Page 522 522
  • Page 523 523
  • Page 524 524
  • Page 525 525
  • Page 526 526
  • Page 527 527
  • Page 528 528
  • Page 529 529
  • Page 530 530
  • Page 531 531
  • Page 532 532
  • Page 533 533
  • Page 534 534
  • Page 535 535
  • Page 536 536
  • Page 537 537
  • Page 538 538
  • Page 539 539
  • Page 540 540
  • Page 541 541
  • Page 542 542
  • Page 543 543
  • Page 544 544
  • Page 545 545
  • Page 546 546
  • Page 547 547
  • Page 548 548
  • Page 549 549
  • Page 550 550
  • Page 551 551
  • Page 552 552
  • Page 553 553
  • Page 554 554
  • Page 555 555
  • Page 556 556
  • Page 557 557
  • Page 558 558
  • Page 559 559
  • Page 560 560
  • Page 561 561
  • Page 562 562
  • Page 563 563
  • Page 564 564
  • Page 565 565
  • Page 566 566
  • Page 567 567
  • Page 568 568
  • Page 569 569
  • Page 570 570
  • Page 571 571
  • Page 572 572
  • Page 573 573
  • Page 574 574
  • Page 575 575
  • Page 576 576
  • Page 577 577
  • Page 578 578
  • Page 579 579
  • Page 580 580
  • Page 581 581
  • Page 582 582
  • Page 583 583
  • Page 584 584
  • Page 585 585
  • Page 586 586
  • Page 587 587
  • Page 588 588
  • Page 589 589
  • Page 590 590
  • Page 591 591
  • Page 592 592
  • Page 593 593
  • Page 594 594
  • Page 595 595
  • Page 596 596
  • Page 597 597
  • Page 598 598
  • Page 599 599
  • Page 600 600
  • Page 601 601
  • Page 602 602
  • Page 603 603
  • Page 604 604
  • Page 605 605
  • Page 606 606
  • Page 607 607
  • Page 608 608
  • Page 609 609
  • Page 610 610
  • Page 611 611
  • Page 612 612
  • Page 613 613
  • Page 614 614
  • Page 615 615
  • Page 616 616
  • Page 617 617
  • Page 618 618
  • Page 619 619
  • Page 620 620
  • Page 621 621
  • Page 622 622
  • Page 623 623
  • Page 624 624
  • Page 625 625
  • Page 626 626
  • Page 627 627
  • Page 628 628
  • Page 629 629
  • Page 630 630
  • Page 631 631
  • Page 632 632
  • Page 633 633
  • Page 634 634
  • Page 635 635
  • Page 636 636
  • Page 637 637
  • Page 638 638
  • Page 639 639
  • Page 640 640
  • Page 641 641
  • Page 642 642
  • Page 643 643
  • Page 644 644
  • Page 645 645
  • Page 646 646
  • Page 647 647
  • Page 648 648
  • Page 649 649
  • Page 650 650
  • Page 651 651
  • Page 652 652
  • Page 653 653
  • Page 654 654
  • Page 655 655
  • Page 656 656
  • Page 657 657
  • Page 658 658
  • Page 659 659
  • Page 660 660
  • Page 661 661
  • Page 662 662
  • Page 663 663
  • Page 664 664
  • Page 665 665
  • Page 666 666
  • Page 667 667
  • Page 668 668
  • Page 669 669
  • Page 670 670
  • Page 671 671
  • Page 672 672
  • Page 673 673
  • Page 674 674
  • Page 675 675
  • Page 676 676
  • Page 677 677
  • Page 678 678
  • Page 679 679
  • Page 680 680
  • Page 681 681
  • Page 682 682
  • Page 683 683
  • Page 684 684
  • Page 685 685
  • Page 686 686
  • Page 687 687
  • Page 688 688
  • Page 689 689
  • Page 690 690
  • Page 691 691
  • Page 692 692
  • Page 693 693
  • Page 694 694
  • Page 695 695
  • Page 696 696
  • Page 697 697
  • Page 698 698
  • Page 699 699
  • Page 700 700
  • Page 701 701
  • Page 702 702
  • Page 703 703
  • Page 704 704
  • Page 705 705
  • Page 706 706
  • Page 707 707
  • Page 708 708
  • Page 709 709
  • Page 710 710
  • Page 711 711
  • Page 712 712
  • Page 713 713
  • Page 714 714
  • Page 715 715
  • Page 716 716
  • Page 717 717
  • Page 718 718
  • Page 719 719
  • Page 720 720
  • Page 721 721
  • Page 722 722
  • Page 723 723
  • Page 724 724
  • Page 725 725
  • Page 726 726
  • Page 727 727
  • Page 728 728
  • Page 729 729
  • Page 730 730
  • Page 731 731
  • Page 732 732
  • Page 733 733
  • Page 734 734
  • Page 735 735
  • Page 736 736
  • Page 737 737
  • Page 738 738
  • Page 739 739
  • Page 740 740
  • Page 741 741
  • Page 742 742
  • Page 743 743
  • Page 744 744
  • Page 745 745
  • Page 746 746
  • Page 747 747
  • Page 748 748
  • Page 749 749
  • Page 750 750
  • Page 751 751
  • Page 752 752
  • Page 753 753
  • Page 754 754
  • Page 755 755
  • Page 756 756
  • Page 757 757
  • Page 758 758
  • Page 759 759
  • Page 760 760
  • Page 761 761
  • Page 762 762
  • Page 763 763
  • Page 764 764
  • Page 765 765
  • Page 766 766
  • Page 767 767
  • Page 768 768
  • Page 769 769
  • Page 770 770
  • Page 771 771
  • Page 772 772
  • Page 773 773
  • Page 774 774
  • Page 775 775
  • Page 776 776
  • Page 777 777
  • Page 778 778
  • Page 779 779
  • Page 780 780
  • Page 781 781
  • Page 782 782
  • Page 783 783
  • Page 784 784
  • Page 785 785
  • Page 786 786
  • Page 787 787
  • Page 788 788
  • Page 789 789
  • Page 790 790
  • Page 791 791
  • Page 792 792
  • Page 793 793
  • Page 794 794
  • Page 795 795
  • Page 796 796
  • Page 797 797
  • Page 798 798
  • Page 799 799
  • Page 800 800
  • Page 801 801
  • Page 802 802
  • Page 803 803
  • Page 804 804
  • Page 805 805
  • Page 806 806
  • Page 807 807
  • Page 808 808
  • Page 809 809
  • Page 810 810
  • Page 811 811
  • Page 812 812
  • Page 813 813
  • Page 814 814
  • Page 815 815
  • Page 816 816
  • Page 817 817
  • Page 818 818
  • Page 819 819
  • Page 820 820
  • Page 821 821
  • Page 822 822
  • Page 823 823
  • Page 824 824
  • Page 825 825
  • Page 826 826
  • Page 827 827
  • Page 828 828
  • Page 829 829
  • Page 830 830
  • Page 831 831
  • Page 832 832
  • Page 833 833
  • Page 834 834
  • Page 835 835
  • Page 836 836
  • Page 837 837
  • Page 838 838
  • Page 839 839
  • Page 840 840
  • Page 841 841
  • Page 842 842
  • Page 843 843
  • Page 844 844
  • Page 845 845
  • Page 846 846
  • Page 847 847
  • Page 848 848
  • Page 849 849
  • Page 850 850
  • Page 851 851
  • Page 852 852
  • Page 853 853
  • Page 854 854
  • Page 855 855
  • Page 856 856
  • Page 857 857
  • Page 858 858
  • Page 859 859
  • Page 860 860
  • Page 861 861
  • Page 862 862
  • Page 863 863
  • Page 864 864
  • Page 865 865
  • Page 866 866
  • Page 867 867
  • Page 868 868
  • Page 869 869
  • Page 870 870
  • Page 871 871
  • Page 872 872
  • Page 873 873
  • Page 874 874
  • Page 875 875
  • Page 876 876
  • Page 877 877
  • Page 878 878
  • Page 879 879
  • Page 880 880
  • Page 881 881
  • Page 882 882
  • Page 883 883
  • Page 884 884
  • Page 885 885
  • Page 886 886
  • Page 887 887
  • Page 888 888
  • Page 889 889
  • Page 890 890
  • Page 891 891
  • Page 892 892
  • Page 893 893
  • Page 894 894
  • Page 895 895
  • Page 896 896
  • Page 897 897
  • Page 898 898
  • Page 899 899
  • Page 900 900
  • Page 901 901
  • Page 902 902
  • Page 903 903
  • Page 904 904
  • Page 905 905
  • Page 906 906
  • Page 907 907
  • Page 908 908
  • Page 909 909
  • Page 910 910
  • Page 911 911
  • Page 912 912
  • Page 913 913
  • Page 914 914
  • Page 915 915
  • Page 916 916
  • Page 917 917
  • Page 918 918
  • Page 919 919
  • Page 920 920
  • Page 921 921
  • Page 922 922
  • Page 923 923
  • Page 924 924
  • Page 925 925
  • Page 926 926
  • Page 927 927
  • Page 928 928
  • Page 929 929
  • Page 930 930
  • Page 931 931
  • Page 932 932
  • Page 933 933
  • Page 934 934
  • Page 935 935
  • Page 936 936
  • Page 937 937
  • Page 938 938
  • Page 939 939
  • Page 940 940
  • Page 941 941
  • Page 942 942
  • Page 943 943
  • Page 944 944
  • Page 945 945
  • Page 946 946
  • Page 947 947
  • Page 948 948
  • Page 949 949
  • Page 950 950
  • Page 951 951
  • Page 952 952
  • Page 953 953
  • Page 954 954
  • Page 955 955
  • Page 956 956
  • Page 957 957
  • Page 958 958
  • Page 959 959
  • Page 960 960
  • Page 961 961
  • Page 962 962
  • Page 963 963
  • Page 964 964
  • Page 965 965
  • Page 966 966
  • Page 967 967
  • Page 968 968
  • Page 969 969
  • Page 970 970
  • Page 971 971
  • Page 972 972
  • Page 973 973
  • Page 974 974
  • Page 975 975

Bull AIX 4.3 - General Programming Guide

Category
Software
Type
Programming Guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI