Changeset 88c74ab in rtems


Ignore:
Timestamp:
Jul 25, 2013, 1:10:11 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
02632e8
Parents:
a2e3f33
git-author:
Sebastian Huber <sebastian.huber@…> (07/25/13 13:10:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/26/13 09:55:47)
Message:

score: Merge tod implementation into one file

Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and
TOD_MILLISECONDS_TO_TICKS().

Files:
3 deleted
92 edited

Legend:

Unmodified
Added
Removed
  • c/src/ada-tests/support/init.c

    ra2e3f33 r88c74ab  
    5252uint32_t ticks_per_second(void)
    5353{
    54   /* XXX HACK -- use public API */
    55   return TOD_TICKS_PER_SECOND;
     54  return rtems_clock_get_ticks_per_second();
    5655}
    5756
  • c/src/lib/libbsp/i386/pc386/ide/ide.c

    ra2e3f33 r88c74ab  
    6464static void pc386_ide_tasking_sleep (void)
    6565{
    66   rtems_task_wake_after (TOD_MICROSECONDS_TO_TICKS (10000) ?
    67                          TOD_MICROSECONDS_TO_TICKS (10000) : 1);
     66  rtems_task_wake_after (RTEMS_MICROSECONDS_TO_TICKS (10000) ?
     67                         RTEMS_MICROSECONDS_TO_TICKS (10000) : 1);
    6868}
    6969
  • c/src/lib/libbsp/lm32/shared/startup/bspstart.c

    ra2e3f33 r88c74ab  
    2222#include "../include/system_conf.h"
    2323#include "../console/uart.h"
    24 #include <rtems/score/heap.h>
    25 
    26 #include <rtems/system.h>
    27 #include <rtems/score/isr.h>
    28 #include <rtems/score/timespec.h>
    29 #include <rtems/score/tod.h>
    3024
    3125/*
  • c/src/lib/libcpu/bfin/clock/rtc.c

    ra2e3f33 r88c74ab  
    1717#include <bsp.h>
    1818#include <libcpu/rtcRegs.h>
     19#include <rtems/score/tod.h>
    1920
    2021/* The following are inside RTEMS -- we are violating visibility!!!
  • c/src/libchip/network/cs8900.c

    ra2e3f33 r88c74ab  
    259259  io_pp_bit_set_reg_16 (cs, CS8900_PP_SelfCTL, CS8900_SELF_CTRL_RESET);
    260260
    261   rtems_task_wake_after (TOD_MILLISECONDS_TO_TICKS (20));
     261  rtems_task_wake_after (RTEMS_MILLISECONDS_TO_TICKS (20));
    262262
    263263  status = io_pp_get_reg_16 (cs, CS8900_PP_SelfST);
     
    661661    sc = rtems_bsdnet_event_receive (CS8900_RX_OK_EVENT,
    662662                                     RTEMS_WAIT | RTEMS_EVENT_ANY,
    663                                      TOD_MILLISECONDS_TO_TICKS (250),
     663                                     RTEMS_MILLISECONDS_TO_TICKS (250),
    664664                                     &events);
    665665
     
    750750   */
    751751
    752   rtems_task_wake_after (TOD_MILLISECONDS_TO_TICKS (750));
     752  rtems_task_wake_after (RTEMS_MILLISECONDS_TO_TICKS (750));
    753753
    754754  /*
     
    816816              sc = rtems_bsdnet_event_receive (CS8900_TX_WAIT_EVENT,
    817817                                               RTEMS_WAIT | RTEMS_EVENT_ANY,
    818                                                TOD_MILLISECONDS_TO_TICKS (750),
     818                                               RTEMS_MILLISECONDS_TO_TICKS (750),
    819819                                               &events);
    820820              if (sc == RTEMS_TIMEOUT)
  • c/src/libchip/network/open_eth.c

    ra2e3f33 r88c74ab  
    460460          rtems_bsdnet_event_receive (OPEN_ETH_TX_WAIT_EVENT,
    461461                                      RTEMS_WAIT | RTEMS_EVENT_ANY,
    462                                       TOD_MILLISECONDS_TO_TICKS(500), &events);
     462                                      RTEMS_MILLISECONDS_TO_TICKS(500), &events);
    463463#endif
    464464      }
  • cpukit/libblock/src/bdbuf.c

    ra2e3f33 r88c74ab  
    207207#if !defined (RTEMS_BDBUF_WAIT_TIMEOUT)
    208208#define RTEMS_BDBUF_WAIT_TIMEOUT \
    209   (TOD_MICROSECONDS_TO_TICKS (20000000))
     209  (RTEMS_MICROSECONDS_TO_TICKS (20000000))
    210210#endif
    211211
  • cpukit/libcsupport/src/__gettod.c

    ra2e3f33 r88c74ab  
    2424#include <sys/time.h>
    2525#include <errno.h>
    26 #include <rtems.h>
     26#include <rtems/score/tod.h>
    2727#include <rtems/seterr.h>
    2828
  • cpukit/libcsupport/src/__times.c

    ra2e3f33 r88c74ab  
    2626#include <errno.h>
    2727#include <rtems/seterr.h>
     28#include <rtems/score/tod.h>
    2829#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    2930  #include <rtems/score/timestamp.h>
  • cpukit/libmisc/cpuuse/cpuusagereport.c

    ra2e3f33 r88c74ab  
    2727#include <rtems/cpuuse.h>
    2828#include <rtems/score/objectimpl.h>
     29#include <rtems/score/tod.h>
    2930#include <rtems/score/watchdogimpl.h>
    3031
  • cpukit/libmisc/cpuuse/cpuusagereset.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <stdlib.h>
    22 #include <ctype.h>
    23 #include <inttypes.h>
    24 
    2521#include <rtems/cpuuse.h>
     22#include <rtems/score/thread.h>
     23#include <rtems/score/tod.h>
    2624#include <rtems/score/watchdogimpl.h>
    2725
  • cpukit/libnetworking/rtems/rtems_dhcp.c

    ra2e3f33 r88c74ab  
    713713     * Sleep until the next poll
    714714     */
    715     timeout = TOD_MILLISECONDS_TO_TICKS (1000);
     715    timeout = RTEMS_MILLISECONDS_TO_TICKS (1000);
    716716    ev_st = rtems_event_receive (RTEMS_EVENT_0,
    717717                                 RTEMS_WAIT | RTEMS_EVENT_ANY,
     
    11481148    update = false;
    11491149    rtems_bsdnet_semaphore_release();
    1150     rtems_task_wake_after(TOD_MILLISECONDS_TO_TICKS(1000));
     1150    rtems_task_wake_after(RTEMS_MILLISECONDS_TO_TICKS(1000));
    11511151    rtems_bsdnet_semaphore_obtain ();
    11521152  }
  • cpukit/libnetworking/rtems/rtems_dhcp_failsafe.c

    ra2e3f33 r88c74ab  
    258258#if BROADCAST_DELAY
    259259  /* Wait before sending broadcast. */
    260   rtems_task_wake_after(TOD_MILLISECONDS_TO_TICKS(BROADCAST_DELAY * 1000));
     260  rtems_task_wake_after(RTEMS_MILLISECONDS_TO_TICKS(BROADCAST_DELAY * 1000));
    261261#endif
    262262
     
    304304#if NETWORK_DOWN_TIME
    305305          dhcp_if_down(ifname);
    306           rtems_task_wake_after(TOD_MILLISECONDS_TO_TICKS(NETWORK_DOWN_TIME * 1000));
     306          rtems_task_wake_after(RTEMS_MILLISECONDS_TO_TICKS(NETWORK_DOWN_TIME * 1000));
    307307          dhcp_if_up(ifname);
    308308          downcount = 0;
     
    312312    }
    313313
    314     rtems_task_wake_after(TOD_MILLISECONDS_TO_TICKS(1000));
     314    rtems_task_wake_after(RTEMS_MILLISECONDS_TO_TICKS(1000));
    315315  }
    316316
  • cpukit/posix/src/alarm.c

    ra2e3f33 r88c74ab  
    2626#include <rtems/posix/pthreadimpl.h>
    2727#include <rtems/posix/psignalimpl.h>
     28#include <rtems/score/threaddispatch.h>
    2829#include <rtems/score/tod.h>
    2930#include <rtems/score/watchdogimpl.h>
  • cpukit/posix/src/clockgetcpuclockid.c

    ra2e3f33 r88c74ab  
    2525#include <rtems/score/isr.h>
    2626#include <rtems/score/thread.h>
    27 #include <rtems/score/tod.h>
    2827
    2928#include <rtems/seterr.h>
  • cpukit/posix/src/clockgetenableattr.c

    ra2e3f33 r88c74ab  
    2525#include <rtems/score/isr.h>
    2626#include <rtems/score/thread.h>
    27 #include <rtems/score/tod.h>
    2827
    2928#include <rtems/seterr.h>
  • cpukit/posix/src/clockgetres.c

    ra2e3f33 r88c74ab  
    2222#include <errno.h>
    2323
    24 #include <rtems/system.h>
     24#include <rtems/score/tod.h>
    2525#include <rtems/config.h>
    26 #include <rtems/score/isr.h>
    27 #include <rtems/score/thread.h>
    28 #include <rtems/score/tod.h>
    29 
    3026#include <rtems/seterr.h>
    3127
  • cpukit/posix/src/clockgettime.c

    ra2e3f33 r88c74ab  
    2222#include <errno.h>
    2323
    24 #include <rtems/system.h>
    25 #include <rtems/score/isr.h>
    26 #include <rtems/score/thread.h>
    2724#include <rtems/score/tod.h>
    28 
    2925#include <rtems/seterr.h>
    3026
  • cpukit/posix/src/clocksetenableattr.c

    ra2e3f33 r88c74ab  
    2525#include <rtems/score/isr.h>
    2626#include <rtems/score/thread.h>
    27 #include <rtems/score/tod.h>
    2827
    2928#include <rtems/seterr.h>
  • cpukit/posix/src/mqueueopen.c

    ra2e3f33 r88c74ab  
    3939#include <mqueue.h>
    4040
    41 #include <rtems/system.h>
     41#include <rtems/score/tod.h>
    4242#include <rtems/score/watchdog.h>
    43 #include <rtems/seterr.h>
    4443#include <rtems/posix/mqueueimpl.h>
    4544#include <rtems/posix/time.h>
     45#include <rtems/seterr.h>
    4646
    4747/*
  • cpukit/posix/src/nanosleep.c

    ra2e3f33 r88c74ab  
    2626#include <rtems/score/threadimpl.h>
    2727#include <rtems/score/timespec.h>
    28 #include <rtems/score/tod.h>
    2928#include <rtems/score/watchdogimpl.h>
    3029
  • cpukit/posix/src/posixtimespecabsolutetimeout.c

    ra2e3f33 r88c74ab  
    2727#include <limits.h>
    2828
    29 #include <rtems/system.h>
    3029#include <rtems/posix/semaphoreimpl.h>
    3130#include <rtems/posix/time.h>
     31#include <rtems/score/tod.h>
    3232#include <rtems/seterr.h>
    3333
  • cpukit/posix/src/ptimer.c

    ra2e3f33 r88c74ab  
    2727#include <rtems/score/isr.h>
    2828#include <rtems/score/thread.h>
    29 #include <rtems/score/tod.h>
    3029
    3130#include <rtems/posix/time.h>
  • cpukit/posix/src/sched_getscheduler.c

    ra2e3f33 r88c74ab  
    2525
    2626#include <rtems/system.h>
    27 #include <rtems/score/tod.h>
    2827#include <rtems/score/thread.h>
    2928#include <rtems/seterr.h>
  • cpukit/posix/src/sched_rr_get_interval.c

    ra2e3f33 r88c74ab  
    2626
    2727#include <rtems/system.h>
    28 #include <rtems/score/tod.h>
    2928#include <rtems/score/threadimpl.h>
    3029#include <rtems/score/timespec.h>
  • cpukit/posix/src/sched_setparam.c

    ra2e3f33 r88c74ab  
    2525
    2626#include <rtems/system.h>
    27 #include <rtems/score/tod.h>
    2827#include <rtems/score/thread.h>
    2928#include <rtems/seterr.h>
  • cpukit/posix/src/sched_setscheduler.c

    ra2e3f33 r88c74ab  
    2323
    2424#include <rtems/system.h>
    25 #include <rtems/score/tod.h>
    2625#include <rtems/score/thread.h>
    2726#include <rtems/seterr.h>
  • cpukit/posix/src/sysconf.c

    ra2e3f33 r88c74ab  
    2323#include <errno.h>
    2424
     25#include <rtems/score/tod.h>
    2526#include <rtems/system.h>
    2627#include <rtems/seterr.h>
    27 #include <rtems/score/tod.h>
    2828#include <rtems/libio_.h>
    2929
  • cpukit/posix/src/timergettime.c

    ra2e3f33 r88c74ab  
    2424#include <errno.h>
    2525
    26 #include <rtems/system.h>
     26#include <rtems/posix/timerimpl.h>
     27#include <rtems/score/tod.h>
     28#include <rtems/score/watchdogimpl.h>
    2729#include <rtems/seterr.h>
    28 #include <rtems/score/thread.h>
    29 #include <rtems/score/tod.h>
    30 #include <rtems/score/timespec.h>
    31 #include <rtems/score/watchdogimpl.h>
    32 #include <rtems/posix/timerimpl.h>
    3330
    3431/*
  • cpukit/posix/src/timersettime.c

    ra2e3f33 r88c74ab  
    2424#include <errno.h>
    2525
    26 #include <rtems/system.h>
    27 #include <rtems/seterr.h>
    28 #include <rtems/score/thread.h>
    29 #include <rtems/score/tod.h>
    30 #include <rtems/score/watchdogimpl.h>
    3126#include <rtems/posix/time.h>
    3227#include <rtems/posix/ptimer.h>
    3328#include <rtems/posix/timerimpl.h>
     29#include <rtems/score/tod.h>
     30#include <rtems/score/watchdogimpl.h>
     31#include <rtems/seterr.h>
    3432
    3533int timer_settime(
  • cpukit/posix/src/timertsr.c

    ra2e3f33 r88c74ab  
    2525#include <signal.h>
    2626
    27 #include <rtems/system.h>
    28 #include <rtems/seterr.h>
    29 #include <rtems/score/thread.h>
    30 #include <rtems/score/tod.h>
    3127#include <rtems/posix/time.h>
    3228#include <rtems/posix/ptimer.h>
    3329#include <rtems/posix/timerimpl.h>
     30#include <rtems/score/tod.h>
    3431
    3532/*
  • cpukit/posix/src/ualarm.c

    ra2e3f33 r88c74ab  
    2525#include <rtems/posix/psignalimpl.h>
    2626#include <rtems/posix/time.h>
     27#include <rtems/score/threaddispatch.h>
    2728#include <rtems/score/tod.h>
    2829#include <rtems/score/watchdogimpl.h>
  • cpukit/rtems/include/rtems/rtems/clock.h

    ra2e3f33 r88c74ab  
    3131#define _RTEMS_RTEMS_CLOCK_H
    3232
    33 #include <rtems/score/tod.h>
    3433#include <rtems/score/watchdog.h>
    3534#include <rtems/rtems/status.h>
  • cpukit/rtems/include/rtems/rtems/support.h

    ra2e3f33 r88c74ab  
    2020
    2121#include <rtems/rtems/types.h>
     22#include <rtems/config.h>
    2223
    2324#ifdef __cplusplus
     
    3334 * @brief Returns the number of micro seconds for the milli seconds value @a _ms.
    3435 */
    35 #define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \
    36         TOD_MILLISECONDS_TO_MICROSECONDS(_ms)
     36#define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) ((uint32_t)(_ms) * 1000UL)
    3737
    3838/**
     
    4040 */
    4141#define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
    42        (TOD_MILLISECONDS_TO_MICROSECONDS(_ms) / \
     42       (RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) / \
    4343          rtems_configuration_get_microseconds_per_tick())
    4444
  • cpukit/rtems/include/rtems/rtems/types.h

    ra2e3f33 r88c74ab  
    2727#include <rtems/score/object.h>
    2828#include <rtems/score/priority.h>
    29 #include <rtems/score/tod.h>
    3029#include <rtems/score/watchdog.h>
    3130#include <rtems/rtems/modes.h>
  • cpukit/rtems/src/clockget.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/isr.h>
    2525#include <rtems/score/thread.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdog.h>
    2827
  • cpukit/rtems/src/clockgetsecondssinceepoch.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/rtems/status.h>
    2321#include <rtems/rtems/clock.h>
    24 #include <rtems/score/isr.h>
    25 #include <rtems/score/thread.h>
    2622#include <rtems/score/tod.h>
    27 #include <rtems/score/watchdog.h>
    2823
    2924rtems_status_code rtems_clock_get_seconds_since_epoch(
  • cpukit/rtems/src/clockgettickspersecond.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
     21#include <rtems/rtems/clock.h>
     22#include <rtems/score/tod.h>
    2223#include <rtems/config.h>
    23 #include <rtems/rtems/status.h>
    24 #include <rtems/rtems/clock.h>
    25 #include <rtems/score/isr.h>
    26 #include <rtems/score/thread.h>
    27 #include <rtems/score/tod.h>
    28 #include <rtems/score/watchdog.h>
    2924
    3025rtems_interval rtems_clock_get_ticks_per_second(void)
  • cpukit/rtems/src/clockgettickssinceboot.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/isr.h>
    2525#include <rtems/score/thread.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdogimpl.h>
    2827
  • cpukit/rtems/src/clockgettod.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
     21#include <rtems/rtems/clock.h>
     22#include <rtems/score/tod.h>
    2223#include <rtems/config.h>
    23 #include <rtems/rtems/status.h>
    24 #include <rtems/rtems/clock.h>
    25 #include <rtems/score/isr.h>
    26 #include <rtems/score/thread.h>
    27 #include <rtems/score/tod.h>
    28 #include <rtems/score/watchdog.h>
    2924
    3025rtems_status_code rtems_clock_get_tod(
  • cpukit/rtems/src/clockgettodtimeval.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/rtems/status.h>
    2321#include <rtems/rtems/clock.h>
    24 #include <rtems/score/isr.h>
    25 #include <rtems/score/thread.h>
    2622#include <rtems/score/tod.h>
    27 #include <rtems/score/watchdog.h>
    2823
    2924rtems_status_code rtems_clock_get_tod_timeval(
  • cpukit/rtems/src/clockgetuptime.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/rtems/status.h>
    2321#include <rtems/rtems/clock.h>
    24 #include <rtems/score/isr.h>
    25 #include <rtems/score/thread.h>
    26 #include <rtems/score/timestamp.h>
    2722#include <rtems/score/tod.h>
    28 #include <rtems/score/watchdog.h>
    2923
    3024/*
  • cpukit/rtems/src/clockgetuptimeseconds.c

    ra2e3f33 r88c74ab  
    2525
    2626#include <rtems/rtems/clock.h>
     27#include <rtems/score/isrlevel.h>
     28#include <rtems/score/tod.h>
    2729
    2830time_t rtems_clock_get_uptime_seconds( void )
  • cpukit/rtems/src/clockgetuptimetimeval.c

    ra2e3f33 r88c74ab  
    2525
    2626#include <rtems/rtems/clock.h>
     27#include <rtems/score/tod.h>
    2728
    2829void rtems_clock_get_uptime_timeval( struct timeval *uptime )
  • cpukit/rtems/src/clocksetnsecshandler.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/isr.h>
    2525#include <rtems/score/thread.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdogimpl.h>
    2827
  • cpukit/rtems/src/clocktodtoseconds.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    2221#include <rtems/rtems/clock.h>
     22#include <rtems/score/tod.h>
    2323
    2424#define TOD_SECONDS_AT_2100_03_01_00_00 4107538800UL
  • cpukit/rtems/src/clocktodvalidate.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
     21#include <rtems/rtems/clock.h>
     22#include <rtems/score/tod.h>
    2223#include <rtems/config.h>
    23 #include <rtems/rtems/clock.h>
    2424
    2525/*
  • cpukit/rtems/src/rtclock.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/isr.h>
    2525#include <rtems/score/thread.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdog.h>
    2827
  • cpukit/rtems/src/rtemstimer.c

    ra2e3f33 r88c74ab  
    2525#include <rtems/score/thread.h>
    2626#include <rtems/rtems/timerimpl.h>
    27 #include <rtems/score/tod.h>
    2827#include <rtems/score/watchdog.h>
    2928
  • cpukit/rtems/src/signalsend.c

    ra2e3f33 r88c74ab  
    2222#include <rtems/rtems/asrimpl.h>
    2323#include <rtems/rtems/tasks.h>
     24#include <rtems/score/isr.h>
    2425#include <rtems/score/threadimpl.h>
    2526
  • cpukit/rtems/src/taskident.c

    ra2e3f33 r88c74ab  
    2626#include <rtems/rtems/tasksimpl.h>
    2727#include <rtems/score/thread.h>
    28 #include <rtems/score/tod.h>
    2928#include <rtems/score/wkspace.h>
    3029#include <rtems/score/apiext.h>
  • cpukit/rtems/src/taskinitusers.c

    ra2e3f33 r88c74ab  
    2828#include <rtems/rtems/tasksimpl.h>
    2929#include <rtems/score/thread.h>
    30 #include <rtems/score/tod.h>
    3130#include <rtems/score/wkspace.h>
    3231#include <rtems/score/apiext.h>
  • cpukit/rtems/src/tasks.c

    ra2e3f33 r88c74ab  
    2929#include <rtems/rtems/tasksimpl.h>
    3030#include <rtems/score/thread.h>
    31 #include <rtems/score/tod.h>
    3231#include <rtems/score/userextimpl.h>
    3332#include <rtems/score/wkspace.h>
  • cpukit/rtems/src/taskwakewhen.c

    ra2e3f33 r88c74ab  
    2222#include <rtems/rtems/clock.h>
    2323#include <rtems/score/threadimpl.h>
     24#include <rtems/score/tod.h>
    2425#include <rtems/score/watchdogimpl.h>
    2526
  • cpukit/rtems/src/timercancel.c

    ra2e3f33 r88c74ab  
    2020#include <rtems/score/thread.h>
    2121#include <rtems/rtems/timerimpl.h>
    22 #include <rtems/score/tod.h>
    2322#include <rtems/score/watchdogimpl.h>
    2423
  • cpukit/rtems/src/timercreate.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/thread.h>
    2525#include <rtems/rtems/timerimpl.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdogimpl.h>
    2827
  • cpukit/rtems/src/timerdelete.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/thread.h>
    2525#include <rtems/rtems/timerimpl.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdogimpl.h>
    2827
  • cpukit/rtems/src/timerfireafter.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/thread.h>
    2525#include <rtems/rtems/timerimpl.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdogimpl.h>
    2827
  • cpukit/rtems/src/timerfirewhen.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/rtems/status.h>
    23 #include <rtems/rtems/support.h>
    24 #include <rtems/score/thread.h>
    2521#include <rtems/rtems/timerimpl.h>
    2622#include <rtems/rtems/clock.h>
  • cpukit/rtems/src/timergetinfo.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/thread.h>
    2525#include <rtems/rtems/timerimpl.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdog.h>
    2827
  • cpukit/rtems/src/timerident.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/thread.h>
    2525#include <rtems/rtems/timerimpl.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdog.h>
    2827
  • cpukit/rtems/src/timerreset.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/thread.h>
    2525#include <rtems/rtems/timerimpl.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdogimpl.h>
    2827
  • cpukit/rtems/src/timerserver.c

    ra2e3f33 r88c74ab  
    2929#include <rtems/rtems/timerimpl.h>
    3030#include <rtems/rtems/tasksimpl.h>
     31#include <rtems/score/isrlevel.h>
    3132#include <rtems/score/threadimpl.h>
    3233#include <rtems/score/tod.h>
  • cpukit/rtems/src/timerserverfireafter.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/score/thread.h>
    2525#include <rtems/rtems/timerimpl.h>
    26 #include <rtems/score/tod.h>
    2726#include <rtems/score/watchdogimpl.h>
    2827
  • cpukit/rtems/src/timerserverfirewhen.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/rtems/status.h>
    23 #include <rtems/rtems/support.h>
    24 #include <rtems/score/thread.h>
    2521#include <rtems/rtems/timerimpl.h>
    2622#include <rtems/rtems/clock.h>
  • cpukit/score/Makefile.am

    ra2e3f33 r88c74ab  
    102102endif
    103103
    104 ## inline
    105 include_rtems_score_HEADERS += inline/rtems/score/tod.inl
    106 
    107104## src
    108105
     
    302299libscore_a_SOURCES += src/coretod.c src/coretodset.c src/coretodget.c \
    303300    src/coretodgetuptimetimespec.c src/coretodtickle.c \
    304     src/coretodmsecstoticks.c src/coretodtickspersec.c src/coretodusectoticks.c
     301    src/coretodtickspersec.c
    305302
    306303## WATCHDOG_C_FILES
  • cpukit/score/include/rtems/score/tod.h

    ra2e3f33 r88c74ab  
    11/**
    2  *  @file  rtems/score/tod.h
    3  *
    4  *  @brief Constants and Structures Associated with the Time of Day Handler.
    5  *
    6  *  This include file contains all the constants and structures associated
    7  *  with the Time of Day Handler.
     2 * @file
     3 *
     4 * @ingroup ScoreTOD
     5 *
     6 * @brief Time of Day Handler API
    87 */
    98
     
    2019#define _RTEMS_SCORE_TOD_H
    2120
     21#include <rtems/score/basedefs.h>
     22#include <rtems/score/timestamp.h>
     23
     24#include <sys/time.h>
    2225#include <time.h>
    23 #include <rtems/score/timestamp.h>
    24 #include <rtems/score/basedefs.h> /* SCORE_EXTERN */
    2526
    2627#ifdef __cplusplus
     
    2930
    3031/**
    31  *  @defgroup ScoreTODConstants TOD Constants
     32 *  @defgroup ScoreTOD Time of Day Handler
    3233 *
    3334 *  @ingroup Score
     
    265266
    266267/**
    267  *  @brief Converts an interval expressed in milliseconds to microseconds.
    268  *
    269  *  This routine converts an interval expressed in milliseconds to microseconds.
    270  *
    271  *  @note This must be a macro so it can be used in "static" tables.
    272  */
    273 #define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((uint32_t)(_ms) * 1000L)
    274 
    275 /**
    276  *  @brief Converts an interval expressed in microseconds to ticks.
    277  *
    278  *  This routine converts an interval expressed in microseconds to ticks.
    279  *
    280  *  @note This must be a macro so it can be used in "static" tables.
    281  */
    282 uint32_t TOD_MICROSECONDS_TO_TICKS(
    283   uint32_t microseconds
    284 );
    285 
    286 /**
    287  *  @brief Converts an interval expressed in milliseconds to ticks.
    288  *
    289  *  This routine converts an interval expressed in milliseconds to ticks.
    290  *
    291  *  @note This must be a macro so it can be used in "static" tables.
    292  */
    293 uint32_t TOD_MILLISECONDS_TO_TICKS(
    294   uint32_t milliseconds
    295 );
    296 
    297 /**
    298268 *  @brief Gets number of ticks in a second.
    299269 *
     
    315285#define TOD_TICKS_PER_SECOND TOD_TICKS_PER_SECOND_method()
    316286
    317 #ifndef __RTEMS_APPLICATION__
    318 #include <rtems/score/tod.inl>
     287/**
     288 * This routine deactivates updating of the current time of day.
     289 */
     290
     291RTEMS_INLINE_ROUTINE void _TOD_Deactivate( void )
     292{
     293  /* XXX do we need something now that we are using timespec for TOD */
     294}
     295
     296/**
     297 * This routine activates updating of the current time of day.
     298 */
     299
     300RTEMS_INLINE_ROUTINE void _TOD_Activate( void )
     301{
     302  /* XXX do we need something now that we are using timespec for TOD */
     303}
     304
     305/**
     306 * This routine returns a timeval based upon the internal timespec format TOD.
     307 */
     308
     309RTEMS_INLINE_ROUTINE void _TOD_Get_timeval(
     310  struct timeval *time
     311)
     312{
     313  Timestamp_Control  snapshot_as_timestamp;
     314  Timestamp_Control *snapshot_as_timestamp_ptr;
     315
     316  snapshot_as_timestamp_ptr =
     317    _TOD_Get_with_nanoseconds( &snapshot_as_timestamp, &_TOD.now );
     318  _Timestamp_To_timeval( snapshot_as_timestamp_ptr, time );
     319}
     320
     321/**@}*/
     322
     323#ifdef __cplusplus
     324}
    319325#endif
    320 
    321 #ifdef __cplusplus
    322 }
    323 #endif
    324 
    325 /**@}*/
    326326
    327327#endif
  • cpukit/score/preinstall.am

    ra2e3f33 r88c74ab  
    340340PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersimplesmp.h
    341341endif
    342 $(PROJECT_INCLUDE)/rtems/score/tod.inl: inline/rtems/score/tod.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
    343         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/tod.inl
    344 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/tod.inl
    345 
  • cpukit/score/src/coretod.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/score/thread.h>
    2321#include <rtems/score/tod.h>
    24 #include <rtems/score/watchdog.h>
    2522
    2623void _TOD_Handler_initialization(void)
  • cpukit/score/src/coretodget.c

    ra2e3f33 r88c74ab  
    2020
    2121#include <rtems/score/tod.h>
     22#include <rtems/score/isrlevel.h>
    2223#include <rtems/score/watchdogimpl.h>
    2324
  • cpukit/score/src/coretodgetuptimetimespec.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/score/isr.h>
    23 #include <rtems/score/timestamp.h>
    2421#include <rtems/score/tod.h>
    2522
  • cpukit/score/src/coretodset.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/score/thread.h>
     21#include <rtems/score/tod.h>
    2322#include <rtems/score/threaddispatch.h>
    24 #include <rtems/score/timestamp.h>
    25 #include <rtems/score/tod.h>
    2623#include <rtems/score/watchdogimpl.h>
    2724
  • cpukit/score/src/coretodtickle.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/score/thread.h>
    23 #include <rtems/score/timestamp.h>
    2421#include <rtems/score/tod.h>
    2522#include <rtems/score/watchdogimpl.h>
  • cpukit/score/src/coretodtickspersec.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
     21#include <rtems/score/tod.h>
    2222#include <rtems/config.h>
    23 #include <rtems/score/tod.h>
    2423
    2524uint32_t TOD_TICKS_PER_SECOND_method(void)
  • cpukit/score/src/timespecaddto.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <sys/types.h>
    2321#include <rtems/score/timespec.h>
    2422#include <rtems/score/tod.h>
  • cpukit/score/src/timespecdivide.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <sys/types.h>
    2321#include <rtems/score/timespec.h>
    2422#include <rtems/score/tod.h>
  • cpukit/score/src/timespecdividebyinteger.c

    ra2e3f33 r88c74ab  
    2020#endif
    2121
    22 #include <rtems/system.h>
    23 #include <sys/types.h>
    2422#include <rtems/score/timespec.h>
    2523#include <rtems/score/tod.h>
  • cpukit/score/src/timespecfromticks.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <time.h>
    22 
    23 #include <rtems/system.h>
    24 #include <rtems/config.h>
    2521#include <rtems/score/timespec.h>
    2622#include <rtems/score/tod.h>
     23#include <rtems/config.h>
    2724
    2825void _Timespec_From_ticks(
  • cpukit/score/src/timespecisvalid.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <sys/types.h>
    22 
    23 #include <rtems/system.h>
    2421#include <rtems/score/timespec.h>
    2522#include <rtems/score/tod.h>
  • cpukit/score/src/timespeclessthan.c

    ra2e3f33 r88c74ab  
    2323#include <rtems/system.h>
    2424#include <rtems/score/timespec.h>
    25 #include <rtems/score/tod.h>
    2625
    2726bool _Timespec_Less_than(
  • cpukit/score/src/timespecsubtract.c

    ra2e3f33 r88c74ab  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <sys/types.h>
    2321#include <rtems/score/timespec.h>
    2422#include <rtems/score/tod.h>
    25 #include <rtems/score/watchdog.h>
    2623
    2724void _Timespec_Subtract(
  • cpukit/score/src/timespectoticks.c

    ra2e3f33 r88c74ab  
    1616#endif
    1717
    18 #include <sys/types.h>
    19 
    20 #include <rtems/system.h>
    21 #include <rtems/config.h>
    2218#include <rtems/score/timespec.h>
    2319#include <rtems/score/tod.h>
    24 #include <rtems/score/watchdog.h>
     20#include <rtems/config.h>
    2521
    2622/**
  • cpukit/score/src/ts64toticks.c

    ra2e3f33 r88c74ab  
    2424#include <rtems/config.h>
    2525#include <rtems/score/timestamp.h>
    26 #include <rtems/score/tod.h>
    2726
    2827#if CPU_TIMESTAMP_USE_INT64 == TRUE
  • testsuites/libtests/block06/init.c

    ra2e3f33 r88c74ab  
    203203  sc = rtems_event_receive (RTEMS_EVENT_0,
    204204                            RTEMS_WAIT | RTEMS_EVENT_ANY,
    205                             TOD_MICROSECONDS_TO_TICKS (timeout * 1000),
     205                            RTEMS_MICROSECONDS_TO_TICKS (timeout * 1000),
    206206                            &out);
    207207  if (sc != RTEMS_SUCCESSFUL)
     
    237237  sc = rtems_event_receive (RTEMS_EVENT_1,
    238238                            RTEMS_WAIT | RTEMS_EVENT_ANY,
    239                             TOD_MICROSECONDS_TO_TICKS (timeout * 1000),
     239                            RTEMS_MICROSECONDS_TO_TICKS (timeout * 1000),
    240240                            &out);
    241241  if (sc != RTEMS_SUCCESSFUL)
     
    331331{
    332332  rtems_status_code sc;
    333   sc = rtems_task_wake_after (TOD_MICROSECONDS_TO_TICKS (msecs * 1000));
     333  sc = rtems_task_wake_after (RTEMS_MICROSECONDS_TO_TICKS (msecs * 1000));
    334334  if (sc != RTEMS_SUCCESSFUL)
    335335  {
  • testsuites/psxtests/psx01/init.c

    ra2e3f33 r88c74ab  
    1818#include "system.h"
    1919#include "pritime.h"
     20
     21#include <rtems/score/tod.h>
    2022
    2123void *POSIX_Init(
  • testsuites/psxtests/psx05/init.c

    ra2e3f33 r88c74ab  
    1717#include "system.h"
    1818#include <errno.h>
     19
     20#include <rtems/score/tod.h>
    1921
    2022#define MUTEX_BAD_ID 0xfffffffe
  • testsuites/psxtests/psxclock/init.c

    ra2e3f33 r88c74ab  
    1717#include "pmacros.h"
    1818#include "pritime.h"
     19
     20#include <rtems/score/tod.h>
    1921
    2022/* forward declarations to avoid warnings */
  • testsuites/samples/nsecs/init.c

    ra2e3f33 r88c74ab  
    2424#include <stdlib.h>
    2525#include <unistd.h>
     26#include <time.h>
    2627#include <sys/time.h>
    2728
     
    8283    struct timespec start, stop;
    8384    struct timespec diff;
    84 #if 0
     85
    8586    clock_gettime( CLOCK_REALTIME, &start );
    8687    clock_gettime( CLOCK_REALTIME, &stop );
    87 #else
    88     _TOD_Get( &start );
    89     _TOD_Get( &stop );
    90 #endif
    9188
    9289    subtract_em( &start, &stop, &diff );
  • testsuites/sptests/sp01/task1.c

    ra2e3f33 r88c74ab  
    2626  directive_failed( status, "rtems_object_get_classic_name" );
    2727
    28   /*
    29    * Use TOD_MILLISECONDS_TO_TICKS not RTEMS_MILLISECONDS_TO_TICKS to
    30    * test C implementation in SuperCore -- not macro version used
    31    * everywhere else.
    32    */
    33   ticks = TOD_MILLISECONDS_TO_TICKS( index * 5 * 1000 );
     28  ticks = RTEMS_MILLISECONDS_TO_TICKS( index * 5 * 1000 );
    3429
    3530  while( FOREVER ) {
  • testsuites/sptests/sp16/task5.c

    ra2e3f33 r88c74ab  
    4747  new_line;
    4848
    49   /*
    50    * Use TOD_MICROSECONDS_TO_TICKS not RTEMS_MICROSECONDS_TO_TICKS to
    51    * test C implementation in SuperCore -- not macro version used
    52    * everywhere else.
    53    */
    54   status = rtems_task_wake_after( TOD_MICROSECONDS_TO_TICKS( 1000000 ) );
     49  status = rtems_task_wake_after( RTEMS_MICROSECONDS_TO_TICKS( 1000000 ) );
    5550  directive_failed( status, "rtems_task_wake_after" );
    5651
  • testsuites/sptests/spcbssched01/task1.c

    ra2e3f33 r88c74ab  
    3535  directive_failed( status, "rtems_task_ident" );
    3636
    37   /*
    38    * Use TOD_MILLISECONDS_TO_TICKS not RTEMS_MILLISECONDS_TO_TICKS to
    39    * test C implementation in SuperCore -- not macro version used
    40    * everywhere else.
    41    */
    42   ticks = TOD_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 );
     37  ticks = RTEMS_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 );
    4338
    4439  while( FOREVER ) {
  • testsuites/sptests/spedfsched01/task1.c

    ra2e3f33 r88c74ab  
    3535  directive_failed( status, "rtems_task_ident" );
    3636
    37   /*
    38    * Use TOD_MILLISECONDS_TO_TICKS not RTEMS_MILLISECONDS_TO_TICKS to
    39    * test C implementation in SuperCore -- not macro version used
    40    * everywhere else.
    41    */
    42   ticks = TOD_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 );
     37  ticks = RTEMS_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 );
    4338
    4439  while( FOREVER ) {
Note: See TracChangeset for help on using the changeset viewer.