Changeset bd98b58 for src/libcfa/concurrency/kernel
- Timestamp:
- Jan 20, 2017, 4:50:15 PM (8 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:
- 207c7e1d
- Parents:
- dcb42b8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/kernel
rdcb42b8 rbd98b58 20 20 #include <stdbool.h> 21 21 22 #include "invoke.h" 23 24 //----------------------------------------------------------------------------- 25 // Cluster 26 struct cluster { 27 simple_thread_list ready_queue; 28 }; 29 30 void ?{}(cluster * this); 31 void ^?{}(cluster * this); 32 33 //----------------------------------------------------------------------------- 34 // Processor 22 35 struct processor { 23 36 struct processorCtx_t * ctx; 24 unsigned int thread_index;25 unsigned int thread_count;26 struct thread_h * threads[10];37 cluster * cltr; 38 coroutine * current_coroutine; 39 thread_h * current_thread; 27 40 bool terminated; 28 41 }; 29 42 30 void ?{}(processor * this );43 void ?{}(processor * this, cluster * cltr); 31 44 void ^?{}(processor * this); 32 45 33 void scheduler_add( struct thread_h * thrd ); 34 void scheduler_remove( struct thread_h * thrd ); 35 void kernel_run( void ); 46 47 //----------------------------------------------------------------------------- 48 // Locks 49 50 void ?{}(simple_lock * this); 51 void ^?{}(simple_lock * this); 52 53 void lock( simple_lock * ); 54 void unlock( simple_lock * ); 36 55 37 56 #endif //KERNEL_H
Note: See TracChangeset
for help on using the changeset viewer.