|
|
1.1 root 1: /*
2: * alarm.h
3: *
4: * Header file for a modest support for SIGALRM catching.
5: */
6:
7: #include <signal.h>
8:
9: extern int timedout; /* flag for receipt of SIGALRM signal */
10: extern int alarmclk(); /* SIGALRM signal Service Function */
11:
12: #define INITALRM() signal(SIGALRM, alarmclk)
13: #define RESETALRM() signal(SIGALRM, alarmclk)
14: #define SETALRM(x) {timedout = 0; alarm(x);}
15: #define CLRALRM() {timedout = 0; alarm(0);}
16: #define STOPALRM() signal(SIGALRM, SIG_IGN)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.