Skip to content

Commit e2f69f4

Browse files
committed
Adds comment clarifying requirement to call alarm(0) after S_TOUT
1 parent 9f1bcb9 commit e2f69f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inc/timeout.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ extern unsigned int TIMEOUT_TIME;
3737
alarm(0); \
3838
} while (0)
3939

40+
41+
/* After any use of S_TOUT one should call alarm(0) to cancel
42+
* the last pending alarm.
43+
*/
4044
#define S_TOUT(exp) \
4145
alarm(TIMEOUT_TIME), \
4246
(exp)

0 commit comments

Comments
 (0)