Ignore:
File:
1 edited

Legend:

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

    rc81ebf9 r82ff5845  
    2828thread_desc * nextThread(cluster * this);
    2929
    30 void ScheduleInternal(void);
    31 void ScheduleInternal(spinlock * lock);
    32 void ScheduleInternal(thread_desc * thrd);
    33 void ScheduleInternal(spinlock * lock, thread_desc * thrd);
    34 void ScheduleInternal(spinlock ** locks, unsigned short count);
    35 void ScheduleInternal(spinlock ** locks, unsigned short count, thread_desc ** thrds, unsigned short thrd_count);
     30void BlockInternal(void);
     31void BlockInternal(spinlock * lock);
     32void BlockInternal(thread_desc * thrd);
     33void BlockInternal(spinlock * lock, thread_desc * thrd);
     34void BlockInternal(spinlock ** locks, unsigned short count);
     35void BlockInternal(spinlock ** locks, unsigned short count, thread_desc ** thrds, unsigned short thrd_count);
    3636
    3737//-----------------------------------------------------------------------------
     
    6060extern thread_local processor * this_processor;
    6161
    62 static inline void disable_interrupts() {
    63         __attribute__((unused)) unsigned short prev = __atomic_fetch_add_2( &this_processor->disable_preempt_count, 1, __ATOMIC_SEQ_CST );
    64         assert( prev != (unsigned short) -1 );
    65 }
    66 
    67 static 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 }
    71 
    72 static 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         if( prev == 1 && this_processor->pending_preemption ) {
    76                 ScheduleInternal( this_processor->current_thread );
    77                 this_processor->pending_preemption = false;
    78         }
     62extern "C" {
     63        void disable_interrupts();
     64        void enable_interrupts_noRF();
     65        void enable_interrupts();
    7966}
    8067
Note: See TracChangeset for help on using the changeset viewer.