Changeset c6e85ef in rtems-libbsd


Ignore:
Timestamp:
Apr 8, 2015, 5:52:14 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, 5-freebsd-12, 6-freebsd-12, freebsd-9.3, master
Children:
c0b0b3e
Parents:
8b722db
git-author:
Sebastian Huber <sebastian.huber@…> (04/08/15 05:52:14)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/08/15 05:58:52)
Message:

Use signed integer type for ticks

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/sys/kernel.h

    r8b722db rc6e85ef  
    6969extern volatile int ticks;
    7070#else /* __rtems__ */
    71 #include <rtems/score/watchdogimpl.h>
    72 #define ticks _Watchdog_Ticks_since_boot
     71/*
     72 * This must be a singed integer type, otherwise expressions like
     73 * (x - ticks) > 0 would yield unexpected results.
     74 */
     75extern volatile int32_t _bsd_ticks;
     76#define ticks _bsd_ticks
    7377#endif /* __rtems__ */
    7478
  • rtemsbsd/rtems/rtems-bsd-init.c

    r8b722db rc6e85ef  
    8686    &maxid_maxcpus, 0, "Max number of CPUs that the system was compiled for.");
    8787
     88RTEMS_STATIC_ASSERT(sizeof(int) == sizeof(int32_t), ticks);
     89
     90volatile uint32_t _Watchdog_Ticks_since_boot;
     91
     92extern volatile int32_t _bsd_ticks
     93    __attribute__ ((__alias__("_Watchdog_Ticks_since_boot")));
     94
    8895rtems_status_code
    8996rtems_bsd_initialize(void)
Note: See TracChangeset for help on using the changeset viewer.