From 0243b0d8d396191662c6da16e0e38dbb845652ce Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 8 Jun 2006 20:47:48 +0000 Subject: 2006-06-08 Joel Sherrill * posix/Makefile.am, posix/preinstall.am, posix/include/rtems/posix/timer.h, posix/src/ptimer.c, posix/src/ptimer1.c, sapi/src/posixapi.c, score/include/rtems/score/object.h: --- cpukit/posix/src/ptimer.c | 76 +++++++++++------------------------------------ 1 file changed, 18 insertions(+), 58 deletions(-) (limited to 'cpukit/posix/src/ptimer.c') diff --git a/cpukit/posix/src/ptimer.c b/cpukit/posix/src/ptimer.c index 3bbf830356..2d0316484e 100644 --- a/cpukit/posix/src/ptimer.c +++ b/cpukit/posix/src/ptimer.c @@ -32,70 +32,30 @@ #include #include -/*****************************/ -/* End of necessary includes */ -/*****************************/ - #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 * * Description: Initialize the internal structure in which the data of all * the timers are stored - * ***************************************************************************/ - -int timer_max; -POSIX_Timer_Control *timer_struct; - + */ -void _POSIX_Timer_Manager_initialization ( int max_timers ) +void _POSIX_Timer_Manager_initialization ( int maximum_timers ) { - int index; - - timer_struct = _Workspace_Allocate_or_fatal_error( - max_timers * sizeof(POSIX_Timer_Control) ); - - /* - * Initialize all the timers - */ - - timer_max = max_timers; - - for (index=0; index