Ignore:
Timestamp:
May 17, 2018, 3:25:12 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, with_gc
Children:
a83ffa4
Parents:
e9a7e90b
Message:

Added assert for set_timer for duration < 1us && != 0.
Preemption now always calls timer with at least 50us durations.
Fixed verifies in nodebug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/alarm.c

    re9a7e90b rb1a4300  
    3737
    3838void __kernel_set_timer( Duration alarm ) {
     39        verifyf(alarm >= 1`us || alarm == 0, "Setting timer to < 1us (%luns)", alarm.tv);
    3940        setitimer( ITIMER_REAL, &(itimerval){ alarm }, NULL );
    4041}
     
    6869}
    6970
    70 __cfaabi_dbg_debug_do( bool validate( alarm_list_t * this ) {
     71#if !defined(NDEBUG) && (defined(__CFA_DEBUG__) || defined(__CFA_VERIFY__))
     72bool validate( alarm_list_t * this ) {
    7173        alarm_node_t ** it = &this->head;
    7274        while( (*it) ) {
     
    7577
    7678        return it == this->tail;
    77 })
     79}
     80#endif
    7881
    7982static inline void insert_at( alarm_list_t * this, alarm_node_t * n, __alarm_it_t p ) {
Note: See TracChangeset for help on using the changeset viewer.