Ignore:
Timestamp:
Jun 16, 2017, 9:07:21 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
42b0d73
Parents:
667c7da
Message:

Added verify macro for asserts only present in debug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/kernel_private.h

    r667c7da r4aa2fb2  
    2222
    2323#include "alarm.h"
     24
     25#include "libhdr.h"
    2426
    2527//-----------------------------------------------------------------------------
     
    6668
    6769static inline void enable_interrupts_noRF() {
    68         unsigned short prev = __atomic_fetch_add_2( &this_processor->disable_preempt_count, -1, __ATOMIC_SEQ_CST );
    69         assert( prev != (unsigned short) 0 );
     70        __attribute__((unused)) unsigned short prev = __atomic_fetch_add_2( &this_processor->disable_preempt_count, -1, __ATOMIC_SEQ_CST );
     71        verify( prev != (unsigned short) 0 );
    7072}
    7173
    7274static inline void enable_interrupts() {
    73         unsigned short prev = __atomic_fetch_add_2( &this_processor->disable_preempt_count, -1, __ATOMIC_SEQ_CST );
    74         assert( prev != (unsigned short) 0 );
     75        __attribute__((unused)) unsigned short prev = __atomic_fetch_add_2( &this_processor->disable_preempt_count, -1, __ATOMIC_SEQ_CST );
     76        verify( prev != (unsigned short) 0 );
    7577        if( prev == 1 && this_processor->pending_preemption ) {
    7678                ScheduleInternal( this_processor->current_thread );
Note: See TracChangeset for help on using the changeset viewer.