alarm [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation
MPE/iX Developer's Kit Reference Manual Volume I
alarm
Schedules a SIGALRM signal.
Syntax
#include <unistd.h>
unsigned int alarm (unsigned int seconds);
Parameters
seconds The number of real-time seconds to wait before generating a
SIGALRM signal. A zero cancels any previously scheduled alarm
request.
Return Values
0 Success. There is no previously scheduled alarm.
>0 Success. The number of seconds remaining on a previously
scheduled alarm is returned.
Description
The alarm() function causes the operating system to generate a SIGALRM
signal for the calling process after the number of real-time seconds
specified by the seconds parameter have elapsed. Operating system
scheduling delays may prevent delivery of the signal until after the
specified time.
Only one SIGALRM signal can be scheduled at a time. Any previously
scheduled alarm is cancelled by the current alarm. A previously
scheduled alarm is cancelled by passing zero in the seconds parameter.
Implementation Considerations
Currently, alarm() does not cause a read timeout.
Errors
None.
See Also
fork(), pause(), sigaction(), <signal.h>, POSIX.1 (Section 3.4.1)
MPE/iX 5.0 Documentation