summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/src/ptimer.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-02 19:11:16 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-02 19:11:16 +0000
commit07e07437c46accefd5fe21dc7f62b59385c4021a (patch)
tree222250e5aac51ea2c672d99edac3ff8d6775ddd8 /c/src/exec/posix/src/ptimer.c
parent*** empty log message *** (diff)
downloadrtems-07e07437c46accefd5fe21dc7f62b59385c4021a.tar.bz2
Final tuning required to drop out POSIX timers.
Diffstat (limited to 'c/src/exec/posix/src/ptimer.c')
-rw-r--r--c/src/exec/posix/src/ptimer.c33
1 files changed, 32 insertions, 1 deletions
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
@@ -35,13 +35,44 @@
#include <rtems/posix/timer.h>
/* ***************************************************************************
+ * 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
*
* Description: Initialize the internal structure in which the data of all
* the timers are stored
* ***************************************************************************/
-extern void TIMER_INITIALIZE_S( int );
int timer_max;
timer_alive_t *timer_struct;