From 07e07437c46accefd5fe21dc7f62b59385c4021a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 2 Nov 1999 19:11:16 +0000 Subject: Final tuning required to drop out POSIX timers. --- c/src/exec/posix/src/ptimer.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'c/src/exec/posix/src/ptimer.c') diff --git a/c/src/exec/posix/src/ptimer.c b/c/src/exec/posix/src/ptimer.c index 72fd7939a2..d8733e8bfa 100644 --- a/c/src/exec/posix/src/ptimer.c +++ b/c/src/exec/posix/src/ptimer.c @@ -34,6 +34,38 @@ #include +/* *************************************************************************** + * TIMER_INITIALIZE_S + * + * Description: Initialize the data of a timer + * ***************************************************************************/ + +void TIMER_INITIALIZE_S ( int timer_pos ) +{ + + /* + * Indicates that the position in the table is free + */ + + timer_struct[timer_pos].state = STATE_FREE_C; + + /* + * The initial data of timing are set with null value + */ + + timer_struct[timer_pos].timer_data.it_value.tv_sec = 0; + timer_struct[timer_pos].timer_data.it_value.tv_nsec = 0; + timer_struct[timer_pos].timer_data.it_interval.tv_sec = 0; + timer_struct[timer_pos].timer_data.it_interval.tv_nsec = 0; + + /* + * The count of expirations is 0 + */ + + timer_struct[timer_pos].overrun = 0; + +} + /* *************************************************************************** * _POSIX_Timer_Manager_initialization * @@ -41,7 +73,6 @@ * the timers are stored * ***************************************************************************/ -extern void TIMER_INITIALIZE_S( int ); int timer_max; timer_alive_t *timer_struct; -- cgit v1.2.3