Changeset bdeba0b for src/libcfa/concurrency/kernel
- Timestamp:
- Jul 6, 2017, 4:18:43 PM (7 years ago)
- 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:
- 955d27e9
- Parents:
- b877fa8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/kernel
rb877fa8 rbdeba0b 33 33 void unlock ( spinlock * ); 34 34 35 struct s ignal_once {36 volatile bool cond;37 struct spinlock lock;38 struct __thread_queue_t blocked;35 struct semaphore { 36 spinlock lock; 37 int count; 38 __thread_queue_t waiting; 39 39 }; 40 40 41 void ?{}(signal_once * this); 42 void ^?{}(signal_once * this); 41 void ?{}(semaphore * this, int count = 1); 42 void ^?{}(semaphore * this); 43 void P(semaphore * this); 44 void V(semaphore * this); 43 45 44 void wait( signal_once * );45 void signal( signal_once * );46 46 47 47 //----------------------------------------------------------------------------- … … 81 81 pthread_t kernel_thread; 82 82 83 s ignal_once terminated;83 semaphore terminated; 84 84 volatile bool is_terminated; 85 85
Note: See TracChangeset
for help on using the changeset viewer.