Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

Guardian Native C Library Calls (a - e) alarm(3)
Link the application to the zputdll library (/G/system/zdllnnn/zputdll).
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use
this function with 32-bit or 64-bit threaded applications.
To use this function in a 32-bit threaded application on systems running H06.24 or later RVUs or
J06.13 or later RVUs, perform the same tasks (described above) used to make the function
thread-aware in a multi-threaded application on systems running H06.21/J06.10 or later RVUs.
To use this function in a 64-bit threaded application on systems running H06.24 or later RVUs or
J06.13 or later RVUs, you must perform all of the following tasks to make the function thread-
aware in a multi-threaded application:
Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
Compile the application using the -Wlp64 compiler command option.
Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
For detailed information about writing multi-threaded and 64-bit applications for the Open Sys-
tem Services environment, see the Open System Services Programmers Guide.
RETURN VALUES
The alarm() function returns the number of seconds remaining from the previous alarm() call,
if any. Otherwise, the alarm() function returns 0 (zero).
ERRORS
The alarm() function never sets the value of errno. However, if the function call is unsuccess-
ful (for example, if the system has no time-list elements, or TLEs, available), then a nondeferr-
able SIGLIMIT signal is delivered to the process.
RELATED INFORMATION
Functions: sigaction(2), signal(3), sleep(3), spt_alarm(2).
Files: signal(4).
STANDARDS CONFORMANCE
The following are HP extensions to the XPG4 Version 2 specification:
A SIGLIMIT signal is delivered to the process if the function call fails.
The use of this function with the POSIX User Thread Model library conforms to the following
industry standards:
IEEE Std 1003.1-2004, POSIX System Application Program Interface
This function does not conform to the async-signal safe requirement of the POSIX.1 standard.
527192-018 Hewlett-Packard Company 117