Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/kernel

    rbdeba0b rc81ebf9  
    2828//-----------------------------------------------------------------------------
    2929// Locks
    30 bool try_lock  ( spinlock * DEBUG_CTX_PARAM2 );
    31 void lock      ( spinlock * DEBUG_CTX_PARAM2 );
    32 void lock_yield( spinlock * DEBUG_CTX_PARAM2 );
    33 void unlock    ( spinlock * );
     30bool try_lock( spinlock * );
     31void lock( spinlock * );
     32void unlock( spinlock * );
    3433
    35 struct semaphore {
    36         spinlock lock;
    37         int count;
    38         __thread_queue_t waiting;
     34struct signal_once {
     35        volatile bool cond;
     36        struct spinlock lock;
     37        struct __thread_queue_t blocked;
    3938};
    4039
    41 void  ?{}(semaphore * this, int count = 1);
    42 void ^?{}(semaphore * this);
    43 void P(semaphore * this);
    44 void V(semaphore * this);
     40void ?{}(signal_once * this);
     41void ^?{}(signal_once * this);
    4542
     43void wait( signal_once * );
     44void signal( signal_once * );
    4645
    4746//-----------------------------------------------------------------------------
     
    6968        unsigned short thrd_count;
    7069};
    71 static inline void ?{}(FinishAction * this) {
     70static inline void ?{}(FinishAction * this) { 
    7271        this->action_code = No_Action;
    7372        this->thrd = NULL;
     
    7978        struct processorCtx_t * runner;
    8079        cluster * cltr;
     80        coroutine_desc * current_coroutine;
     81        thread_desc * current_thread;
    8182        pthread_t kernel_thread;
    82 
    83         semaphore terminated;
     83       
     84        signal_once terminated;
    8485        volatile bool is_terminated;
    8586
     
    8990        unsigned int preemption;
    9091
     92        unsigned short disable_preempt_count;
     93
    9194        bool pending_preemption;
    92 
    93         char * last_enable;
    9495};
    9596
Note: See TracChangeset for help on using the changeset viewer.