diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-20 08:31:36 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-24 09:37:22 +0200 |
commit | 27cfe7c86ba0801f4961871869ec4e691ca694f3 (patch) | |
tree | c273dd3776caa064ea60f910411329369b66cc39 /testsuites | |
parent | score: Add _Thread_Add_timeout_ticks() (diff) | |
download | rtems-27cfe7c86ba0801f4961871869ec4e691ca694f3.tar.bz2 |
score: Add _Watchdog_Ticks_per_second
This value is frequently used. Avoid the function call overhead and the
integer division at run-time.
Update #3117.
Update #3182.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/spwatchdog/init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuites/sptests/spwatchdog/init.c b/testsuites/sptests/spwatchdog/init.c index 6e5e155a00..f027236434 100644 --- a/testsuites/sptests/spwatchdog/init.c +++ b/testsuites/sptests/spwatchdog/init.c @@ -57,6 +57,11 @@ static void test_watchdog_static_init( void ) rtems_test_assert( memcmp( &a, &b, sizeof( a ) ) == 0 ); } +static void test_watchdog_config( void ) +{ + rtems_test_assert( _Watchdog_Ticks_per_second == 100 ); +} + static bool test_watchdog_is_inactive( test_watchdog *watchdog ) { return _Watchdog_Get_state( &watchdog->Base ) == WATCHDOG_INACTIVE; @@ -227,6 +232,7 @@ rtems_task Init( test_watchdog_operations(); test_watchdog_static_init(); + test_watchdog_config(); build_time( &time, 12, 31, 1988, 9, 0, 0, 0 ); |