Changeset 0243b0d in rtems for cpukit/posix/src/ptimer.c


Ignore:
Timestamp:
Jun 8, 2006, 8:47:48 PM (14 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
25571ae
Parents:
7c99007
Message:

2006-06-08 Joel Sherrill <joel@…>

  • 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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/ptimer.c

    r7c99007 r0243b0d  
    3333#include <signal.h>
    3434
    35 /*****************************/
    36 /* End of necessary includes */
    37 /*****************************/
    38 
    3935#include <rtems/posix/timer.h>
    4036
    41 /* ***************************************************************************
    42  * TIMER_INITIALIZE_S
    43  *
    44  *  Description: Initialize the data of a timer
    45  * ***************************************************************************/
    46 
    47 void TIMER_INITIALIZE_S ( int timer_pos )
    48 {
    49 
    50    /*
    51     * Indicates that the position in the table is free
    52     */
    53 
    54     timer_struct[timer_pos].state = STATE_FREE_C;
    55 
    56    /*
    57     * The initial data of timing are set with null value
    58     */
    59 
    60     timer_struct[timer_pos].timer_data.it_value.tv_sec     = 0;
    61     timer_struct[timer_pos].timer_data.it_value.tv_nsec    = 0;
    62     timer_struct[timer_pos].timer_data.it_interval.tv_sec  = 0;
    63     timer_struct[timer_pos].timer_data.it_interval.tv_nsec = 0;
    64 
    65    /*
    66     * The count of expirations is 0
    67     */
    68 
    69     timer_struct[timer_pos].overrun = 0;
    70 
    71 }
    72 
    73 /* ***************************************************************************
     37/*
    7438 * _POSIX_Timer_Manager_initialization
    7539 *
    7640 *  Description: Initialize the internal structure in which the data of all
    7741 *               the timers are stored
    78  * ***************************************************************************/
     42 */
    7943
    80 int timer_max;
    81 POSIX_Timer_Control *timer_struct;
    82 
    83 
    84 void _POSIX_Timer_Manager_initialization ( int max_timers )
     44void _POSIX_Timer_Manager_initialization ( int maximum_timers )
    8545{
    86    int index;
    87 
    88    timer_struct = _Workspace_Allocate_or_fatal_error(
    89       max_timers * sizeof(POSIX_Timer_Control) );
    90 
    91    /*
    92     *  Initialize all the timers
    93     */
    94 
    95    timer_max = max_timers;
    96 
    97    for (index=0; index<max_timers; index++)
    98      TIMER_INITIALIZE_S( index );
    99 
    100    timer_max = max_timers;
     46  _Objects_Initialize_information(
     47    &_POSIX_Timer_Information,  /* object information table */
     48    OBJECTS_POSIX_API,          /* object API */
     49    OBJECTS_POSIX_TIMERS,       /* object class */
     50    maximum_timers,             /* maximum objects of this class */
     51    sizeof( POSIX_Timer_Control ),
     52                                /* size of this object's control block */
     53    FALSE,                      /* TRUE if names for this object are strings */
     54    _POSIX_PATH_MAX             /* maximum length of each object's name */
     55#if defined(RTEMS_MULTIPROCESSING)
     56    ,
     57    FALSE,                      /* TRUE if this is a global object class */
     58    NULL                        /* Proxy extraction support callout */
     59#endif
     60  );
    10161}
Note: See TracChangeset for help on using the changeset viewer.