Changes in src/libcfa/concurrency/kernel [bdeba0b:c81ebf9]
- File:
-
- 1 edited
-
src/libcfa/concurrency/kernel (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/kernel
rbdeba0b rc81ebf9 28 28 //----------------------------------------------------------------------------- 29 29 // 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 * ); 30 bool try_lock( spinlock * ); 31 void lock( spinlock * ); 32 void unlock( spinlock * ); 34 33 35 struct s emaphore {36 spinlock lock;37 int count;38 __thread_queue_t waiting;34 struct signal_once { 35 volatile bool cond; 36 struct spinlock lock; 37 struct __thread_queue_t blocked; 39 38 }; 40 39 41 void ?{}(semaphore * this, int count = 1); 42 void ^?{}(semaphore * this); 43 void P(semaphore * this); 44 void V(semaphore * this); 40 void ?{}(signal_once * this); 41 void ^?{}(signal_once * this); 45 42 43 void wait( signal_once * ); 44 void signal( signal_once * ); 46 45 47 46 //----------------------------------------------------------------------------- … … 69 68 unsigned short thrd_count; 70 69 }; 71 static inline void ?{}(FinishAction * this) { 70 static inline void ?{}(FinishAction * this) { 72 71 this->action_code = No_Action; 73 72 this->thrd = NULL; … … 79 78 struct processorCtx_t * runner; 80 79 cluster * cltr; 80 coroutine_desc * current_coroutine; 81 thread_desc * current_thread; 81 82 pthread_t kernel_thread; 82 83 s emaphore terminated;83 84 signal_once terminated; 84 85 volatile bool is_terminated; 85 86 … … 89 90 unsigned int preemption; 90 91 92 unsigned short disable_preempt_count; 93 91 94 bool pending_preemption; 92 93 char * last_enable;94 95 }; 95 96
Note:
See TracChangeset
for help on using the changeset viewer.