The description of each function in this refernce contains the following sections:
This section gives the header files that should be included within a source file that references the function or macro. It also shows an appropriate declaration for the function or for a function that could be substituted for a macro. This declaration isn't included in your program; only the header file(s) should be included.
When a pointer argument is passed to a function that doesn't modify the item indicated by that pointer, the argument is shown with const before the argument. For example, the following indicates that the array pointed at by string isn't changed:
const char *string
This section gives a brief description of the arguments to the function.
The section indicates the library that you need to bind with your application in order to use the function.
To link against a library, use the -l option to qcc, omitting the lib prefix and any extension from the library's name. For example, to link against libsocket, specify -l socket. For more information, see the Compiling and Debugging chapter of the Neutrino Programmer's Guide.
This section describes the function or macro.
This section gives the return value (if any) for the function or macro.
This section describes the special values that the function might assign to the global variable errno.
|This section doesn't necessarily list all of the values that the function could set errno to.|
This optional section provides a list of related functions or macros as well as pertinent docs to look for more information.
This optional section gives one or more examples of the use of the function. The examples are often just code snippets, not complete programs.
This section tells where the function or macro is commonly found, which may be helpful when porting code from one environment to another. Here are the classes:
This standard incorporates the POSIX 1003.2-1992 and 1003.1-1996 standards, the approved drafts (POSIX 1003.1a, POSIX 1003.1d, POSIX 1003.1g and POSIX 1003.1j) and the Standard Unix specification. A joint technical working group — the Austin Common Standards Revision Group (CSRG) — was formed to merge these standards.
|For an up-to-date status of the many POSIX drafts/standards documents, see the PASC (Portable Applications Standards Committee of the IEEE Computer Society) report at http://www.pasc.org/standing/sd11.html.|
A classification of “POSIX 1003.1” can be followed by one or more codes that indicate which option or options the functions belong to. The codes include the following:
|CPT||Process CPU-Time Clocks|
|CX||Extension to the ISO C standard|
|MF||Memory Mapped Files|
|ML||Process Memory Locking|
|MLR||Range Memory Locking|
|RTS||Realtime Signals Extension|
|SHM||Shared Memory Objects|
|TCT||Thread CPU-Time Clocks|
|TPI||Thread Priority Inheritance|
|TPP||Thread Priority Protection|
|TPS||Thread Execution Scheduling|
|TSA||Thread Stack Address Attribute|
|TSH||Thread Process-Shared Synchronization|
|TSS||Thread Stack Size Attribute|
|TYM||Typed Memory Objects|
|XSI||X/Open Systems Interfaces Extension|
If two codes are separated by a space, you need to use both options; if the codes are separated by a vertical bar (|), the functionality is supported if you use either option.
For more information, see the Standard for Information Technology — Portable Operating System Interface: Base Definitions.
|Any QNX 4 functions in the C library are provided only to make it easier to port QNX 4 programs. Don't use these in QNX Neutrino programs.|
We've created the following Unix categories to differentiate:
This section summarizes whether or not it's safe to use the C library functions in certain situations:
Some of the signal-safe functions modify errno on failure. If you use any of these in a signal handler, asynchronous signals may have the side effect of modifying errno in an unpredictable way. If any of the code that can be interrupted checks the value of errno (this also applies to library calls, so you should assume that most library calls may internally check errno), make sure that your signal handler saves errno on entry and restores it on exit.
All of the above also applies to signal-unsafe functions, with one exception: if a signal handler calls a signal-unsafe function, make sure that signal doesn't interrupt a signal-unsafe function.
For a summary, see the Summary of Safety Information appendix.