Changeset a9e26f5 in rtems-libbsd


Ignore:
Timestamp:
Oct 28, 2013, 3:42:55 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
e65783f
Parents:
0c9f27b
git-author:
Sebastian Huber <sebastian.huber@…> (10/28/13 15:42:55)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/31/13 12:18:52)
Message:

TIMEOUT(9): Use timer server for callout_tick()

Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r0c9f27b ra9e26f5  
    881881TEST_TIMEOUT01_O_FILES += testsuite/timeout01/timeout_test.o
    882882TEST_TIMEOUT01_D_FILES += testsuite/timeout01/timeout_test.d
    883 TEST_TIMEOUT01_O_FILES += testsuite/timeout01/timeout_helper.o
    884 TEST_TIMEOUT01_D_FILES += testsuite/timeout01/timeout_helper.d
    885883$(TEST_TIMEOUT01): $(TEST_TIMEOUT01_O_FILES) $(LIB)
    886884        $(LINK.c) -Wl,-Map,testsuite/timeout01/timeout01.map $^ -lm -lz -o $@
  • freebsd-to-rtems.py

    r0c9f27b ra9e26f5  
    23562356tests.addTest('netshell01', ['test_main', 'shellconfig', 'ns_parser_vars'], False)
    23572357tests.addTest('swi01', ['init', 'swi_test'])
    2358 tests.addTest('timeout01', ['init', 'timeout_test', 'timeout_helper'])
     2358tests.addTest('timeout01', ['init', 'timeout_test'])
    23592359tests.addTest('init01', ['test_main'])
    23602360tests.addTest('thread01', ['test_main'])
  • freebsd/sys/kern/kern_timeout.c

    r0c9f27b ra9e26f5  
    161161static void rtems_bsd_timeout_init(void *);
    162162
     163static void
     164rtems_bsd_callout_timer(rtems_id id, void *arg)
     165{
     166        rtems_status_code sc;
     167
     168        (void) arg;
     169
     170        sc = rtems_timer_reset(id);
     171        BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
     172
     173        callout_tick();
     174}
     175
    163176static void callout_cpu_init(struct callout_cpu *);
    164177
     
    175188        struct callout_cpu *cc;
    176189#ifdef __rtems__
     190        rtems_status_code sc;
     191        rtems_id id;
    177192        caddr_t v;
    178193
     
    203218#else /* __rtems__ */
    204219        callout_cpu_init(cc);
     220
     221        sc = rtems_timer_create(rtems_build_name('_', 'C', 'L', 'O'), &id);
     222        BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
     223
     224        sc = rtems_timer_server_fire_after(id, 1, rtems_bsd_callout_timer, NULL);
     225        BSD_ASSERT(sc == RTEMS_SUCCESSFUL);
    205226#endif /* __rtems__ */
    206227}
  • libbsd.txt

    r0c9f27b ra9e26f5  
    100100
    101101* KQUEUE(2): Choose proper lock for global kqueue list.
     102
     103* TIMEOUT(9): Maybe use special task instead of timer server to call
     104  callout_tick().
    102105
    103106[listing]
  • testsuite/timeout01/init.c

    r0c9f27b ra9e26f5  
    3939
    4040#include "timeout_test.h"
    41 #include "timeout_helper.h"
    4241
    4342static void Init(rtems_task_argument arg)
     
    4948        sc = rtems_bsd_initialize();
    5049        assert(sc == RTEMS_SUCCESSFUL);
    51 
    52         callout_tick_task_init();
    5350
    5451        timeout_test();
Note: See TracChangeset for help on using the changeset viewer.