4 * Ask the kernel to schedule a synchronous alarm for the caller, using either
5 * an absolute or a relative number of clock ticks. The new alarm replaces any
6 * previously set alarm. If a relative expiry time of zero is given, the
7 * current alarm is stopped. Return OK or a negative error code. On success,
8 * optionally return the time left on the previous timer (TMR_NEVER if none was
9 * set) and the current time.
12 sys_setalarm2(clock_t exp_time
, int abs_time
, clock_t * time_left
,
18 m
.m_lsys_krn_sys_setalarm
.exp_time
= exp_time
; /* expiration time */
19 m
.m_lsys_krn_sys_setalarm
.abs_time
= abs_time
; /* time is absolute? */
21 if ((r
= _kernel_call(SYS_SETALARM
, &m
)) != OK
)
24 if (time_left
!= NULL
)
25 *time_left
= m
.m_lsys_krn_sys_setalarm
.time_left
;
27 *uptime
= m
.m_lsys_krn_sys_setalarm
.uptime
;