Changeset 07e0743 in rtems


Ignore:
Timestamp:
Nov 2, 1999, 7:11:16 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
811fae1
Parents:
68003979
Message:

Final tuning required to drop out POSIX timers.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/include/rtems/posix/Makefile.am

    r68003979 r07e0743  
    1111H_PIECES = cancel.h cond.h config.h key.h mqueue.h mutex.h posixapi.h \
    1212    priority.h psignal.h pthread.h ptimer.h semaphore.h seterr.h threadsup.h \
    13     time.h $(MP_H_PIECES)
     13    time.h timer.h $(MP_H_PIECES)
    1414#H_PIECES= intr.h threadsup.h time.h
    1515
  • c/src/exec/posix/include/rtems/posix/timer.h

    r68003979 r07e0743  
    55#ifndef __RTEMS_POSIX_TIMERS_h
    66#define __RTEMS_POSIX_TIMERS_h
     7
     8/* ************
     9 * Constants
     10 * ************/
     11
     12#define STATE_FREE_C        0x01 /* Free position of the table of timers   */
     13#define STATE_CREATE_NEW_C  0x02 /* Created timer but not running          */
     14#define STATE_CREATE_RUN_C  0x03 /* Created timer and running              */
     15#define STATE_CREATE_STOP_C 0x04 /* Created, ran and stopped timer         */
     16#define MAX_NSEC_C    1000000000 /* Maximum number of nsec allowed         */
     17#define MIN_NSEC_C             0 /* Minimum number of nsec allowew         */
     18#define TIMER_RELATIVE_C       0 /* Indicates that the fire time is
     19                                  * relative to the current one            */
     20#define SEC_TO_TICKS_C _TOD_Ticks_per_second /* Number of ticks in a second*/
     21#define NSEC_PER_SEC_C 1000000000 /* Nanoseconds in a second               */
     22
     23#define NO_MORE_TIMERS_C      11 /* There is not available timers          */
     24#define BAD_TIMER_C           11 /* The timer does not exist in the table  */
     25
     26#define SECONDS_PER_YEAR_C    ( 360 * 24 * 60 * 60 )
     27#define SECONDS_PER_MONTH_C    ( 30 * 24 * 60 * 60 )
     28#define SECONDS_PER_DAY_C           ( 24 * 60 * 60 )
     29#define SECONDS_PER_HOUR_C               ( 60 * 60 )
     30#define SECONDS_PER_MINUTE_C                  ( 60 )
     31
    732
    833/*
  • c/src/exec/posix/src/ptimer.c

    r68003979 r07e0743  
    3636
    3737/* ***************************************************************************
     38 * TIMER_INITIALIZE_S
     39 *
     40 *  Description: Initialize the data of a timer
     41 * ***************************************************************************/
     42
     43void TIMER_INITIALIZE_S ( int timer_pos )
     44{
     45
     46   /*
     47    * Indicates that the position in the table is free
     48    */
     49
     50    timer_struct[timer_pos].state = STATE_FREE_C;
     51
     52   /*
     53    * The initial data of timing are set with null value
     54    */
     55
     56    timer_struct[timer_pos].timer_data.it_value.tv_sec     = 0;
     57    timer_struct[timer_pos].timer_data.it_value.tv_nsec    = 0;
     58    timer_struct[timer_pos].timer_data.it_interval.tv_sec  = 0;
     59    timer_struct[timer_pos].timer_data.it_interval.tv_nsec = 0;
     60
     61   /*
     62    * The count of expirations is 0
     63    */
     64
     65    timer_struct[timer_pos].overrun = 0;
     66
     67}
     68
     69/* ***************************************************************************
    3870 * _POSIX_Timer_Manager_initialization
    3971 *
     
    4274 * ***************************************************************************/
    4375
    44 extern void TIMER_INITIALIZE_S( int );
    4576int timer_max;
    4677timer_alive_t *timer_struct;
  • c/src/exec/posix/src/ptimer1.c

    r68003979 r07e0743  
    3838 * Constants
    3939 * ************/
    40 
    41 #define STATE_FREE_C        0x01 /* Free position of the table of timers   */
    42 #define STATE_CREATE_NEW_C  0x02 /* Created timer but not running          */
    43 #define STATE_CREATE_RUN_C  0x03 /* Created timer and running              */
    44 #define STATE_CREATE_STOP_C 0x04 /* Created, ran and stopped timer         */
    45 #define MAX_NSEC_C    1000000000 /* Maximum number of nsec allowed         */
    46 #define MIN_NSEC_C             0 /* Minimum number of nsec allowew         */
    47 #define TIMER_RELATIVE_C       0 /* Indicates that the fire time is       
    48                                   * relative to the current one            */
    49 #define SEC_TO_TICKS_C _TOD_Ticks_per_second /* Number of ticks in a second*/
    50 #define NSEC_PER_SEC_C 1000000000 /* Nanoseconds in a second               */
    51 
    52 #define NO_MORE_TIMERS_C      11 /* There is not available timers          */
    53 #define BAD_TIMER_C           11 /* The timer does not exist in the table  */
    54 
    55 #define SECONDS_PER_YEAR_C    ( 360 * 24 * 60 * 60 )
    56 #define SECONDS_PER_MONTH_C    ( 30 * 24 * 60 * 60 )
    57 #define SECONDS_PER_DAY_C           ( 24 * 60 * 60 )
    58 #define SECONDS_PER_HOUR_C               ( 60 * 60 )
    59 #define SECONDS_PER_MINUTE_C                  ( 60 )
    6040
    6141/*
     
    122102 * ***************************************************************************/
    123103
    124 void TIMER_INITIALIZE_S ( int timer_pos )
    125 {
    126 
    127    /*
    128     * Indicates that the position in the table is free
    129     */
    130 
    131     timer_struct[timer_pos].state = STATE_FREE_C;
    132 
    133    /*
    134     * The initial data of timing are set with null value
    135     */
    136 
    137     timer_struct[timer_pos].timer_data.it_value.tv_sec     = 0;
    138     timer_struct[timer_pos].timer_data.it_value.tv_nsec    = 0;
    139     timer_struct[timer_pos].timer_data.it_interval.tv_sec  = 0;
    140     timer_struct[timer_pos].timer_data.it_interval.tv_nsec = 0;
    141 
    142    /*
    143     * The count of expirations is 0
    144     */
    145 
    146     timer_struct[timer_pos].overrun = 0;
    147 
    148 }
     104extern void TIMER_INITIALIZE_S ( int timer_pos );
    149105
    150106/* ***************************************************************************
  • cpukit/posix/include/rtems/posix/timer.h

    r68003979 r07e0743  
    55#ifndef __RTEMS_POSIX_TIMERS_h
    66#define __RTEMS_POSIX_TIMERS_h
     7
     8/* ************
     9 * Constants
     10 * ************/
     11
     12#define STATE_FREE_C        0x01 /* Free position of the table of timers   */
     13#define STATE_CREATE_NEW_C  0x02 /* Created timer but not running          */
     14#define STATE_CREATE_RUN_C  0x03 /* Created timer and running              */
     15#define STATE_CREATE_STOP_C 0x04 /* Created, ran and stopped timer         */
     16#define MAX_NSEC_C    1000000000 /* Maximum number of nsec allowed         */
     17#define MIN_NSEC_C             0 /* Minimum number of nsec allowew         */
     18#define TIMER_RELATIVE_C       0 /* Indicates that the fire time is
     19                                  * relative to the current one            */
     20#define SEC_TO_TICKS_C _TOD_Ticks_per_second /* Number of ticks in a second*/
     21#define NSEC_PER_SEC_C 1000000000 /* Nanoseconds in a second               */
     22
     23#define NO_MORE_TIMERS_C      11 /* There is not available timers          */
     24#define BAD_TIMER_C           11 /* The timer does not exist in the table  */
     25
     26#define SECONDS_PER_YEAR_C    ( 360 * 24 * 60 * 60 )
     27#define SECONDS_PER_MONTH_C    ( 30 * 24 * 60 * 60 )
     28#define SECONDS_PER_DAY_C           ( 24 * 60 * 60 )
     29#define SECONDS_PER_HOUR_C               ( 60 * 60 )
     30#define SECONDS_PER_MINUTE_C                  ( 60 )
     31
    732
    833/*
  • cpukit/posix/src/ptimer.c

    r68003979 r07e0743  
    3636
    3737/* ***************************************************************************
     38 * TIMER_INITIALIZE_S
     39 *
     40 *  Description: Initialize the data of a timer
     41 * ***************************************************************************/
     42
     43void TIMER_INITIALIZE_S ( int timer_pos )
     44{
     45
     46   /*
     47    * Indicates that the position in the table is free
     48    */
     49
     50    timer_struct[timer_pos].state = STATE_FREE_C;
     51
     52   /*
     53    * The initial data of timing are set with null value
     54    */
     55
     56    timer_struct[timer_pos].timer_data.it_value.tv_sec     = 0;
     57    timer_struct[timer_pos].timer_data.it_value.tv_nsec    = 0;
     58    timer_struct[timer_pos].timer_data.it_interval.tv_sec  = 0;
     59    timer_struct[timer_pos].timer_data.it_interval.tv_nsec = 0;
     60
     61   /*
     62    * The count of expirations is 0
     63    */
     64
     65    timer_struct[timer_pos].overrun = 0;
     66
     67}
     68
     69/* ***************************************************************************
    3870 * _POSIX_Timer_Manager_initialization
    3971 *
     
    4274 * ***************************************************************************/
    4375
    44 extern void TIMER_INITIALIZE_S( int );
    4576int timer_max;
    4677timer_alive_t *timer_struct;
  • cpukit/posix/src/ptimer1.c

    r68003979 r07e0743  
    3838 * Constants
    3939 * ************/
    40 
    41 #define STATE_FREE_C        0x01 /* Free position of the table of timers   */
    42 #define STATE_CREATE_NEW_C  0x02 /* Created timer but not running          */
    43 #define STATE_CREATE_RUN_C  0x03 /* Created timer and running              */
    44 #define STATE_CREATE_STOP_C 0x04 /* Created, ran and stopped timer         */
    45 #define MAX_NSEC_C    1000000000 /* Maximum number of nsec allowed         */
    46 #define MIN_NSEC_C             0 /* Minimum number of nsec allowew         */
    47 #define TIMER_RELATIVE_C       0 /* Indicates that the fire time is       
    48                                   * relative to the current one            */
    49 #define SEC_TO_TICKS_C _TOD_Ticks_per_second /* Number of ticks in a second*/
    50 #define NSEC_PER_SEC_C 1000000000 /* Nanoseconds in a second               */
    51 
    52 #define NO_MORE_TIMERS_C      11 /* There is not available timers          */
    53 #define BAD_TIMER_C           11 /* The timer does not exist in the table  */
    54 
    55 #define SECONDS_PER_YEAR_C    ( 360 * 24 * 60 * 60 )
    56 #define SECONDS_PER_MONTH_C    ( 30 * 24 * 60 * 60 )
    57 #define SECONDS_PER_DAY_C           ( 24 * 60 * 60 )
    58 #define SECONDS_PER_HOUR_C               ( 60 * 60 )
    59 #define SECONDS_PER_MINUTE_C                  ( 60 )
    6040
    6141/*
     
    122102 * ***************************************************************************/
    123103
    124 void TIMER_INITIALIZE_S ( int timer_pos )
    125 {
    126 
    127    /*
    128     * Indicates that the position in the table is free
    129     */
    130 
    131     timer_struct[timer_pos].state = STATE_FREE_C;
    132 
    133    /*
    134     * The initial data of timing are set with null value
    135     */
    136 
    137     timer_struct[timer_pos].timer_data.it_value.tv_sec     = 0;
    138     timer_struct[timer_pos].timer_data.it_value.tv_nsec    = 0;
    139     timer_struct[timer_pos].timer_data.it_interval.tv_sec  = 0;
    140     timer_struct[timer_pos].timer_data.it_interval.tv_nsec = 0;
    141 
    142    /*
    143     * The count of expirations is 0
    144     */
    145 
    146     timer_struct[timer_pos].overrun = 0;
    147 
    148 }
     104extern void TIMER_INITIALIZE_S ( int timer_pos );
    149105
    150106/* ***************************************************************************
Note: See TracChangeset for help on using the changeset viewer.