Changeset b067d9b for libcfa/src/concurrency/kernel_private.hfa
- Timestamp:
- Oct 29, 2019, 4:01:24 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 773db65, 9421f3d8
- Parents:
- 7951100 (diff), 8364209 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel_private.hfa
r7951100 rb067d9b 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // kernel_private.h --7 // kernel_private.hfa -- 8 8 // 9 9 // Author : Thierry Delisle … … 16 16 #pragma once 17 17 18 #include "kernel "19 #include "thread "18 #include "kernel.hfa" 19 #include "thread.hfa" 20 20 21 #include "alarm.h "21 #include "alarm.hfa" 22 22 23 23 … … 26 26 27 27 extern "C" { 28 void disable_interrupts() ;28 void disable_interrupts() OPTIONAL_THREAD; 29 29 void enable_interrupts_noPoll(); 30 30 void enable_interrupts( __cfaabi_dbg_ctx_param ); … … 34 34 static inline void WakeThread( thread_desc * thrd ) { 35 35 if( !thrd ) return; 36 37 verify(thrd->state == Inactive); 36 38 37 39 disable_interrupts(); … … 54 56 // Processor 55 57 void main(processorCtx_t *); 56 void start(processor * this); 57 void runThread(processor * this, thread_desc * dst); 58 void finishRunning(processor * this); 59 void halt(processor * this); 60 void wake(processor * this); 61 void terminate(processor * this); 62 void spin(processor * this, unsigned int * spin_count); 58 59 static inline void wake_fast(processor * this) { 60 __cfaabi_dbg_print_safe("Kernel : Waking up processor %p\n", this); 61 post( this->idleLock ); 62 } 63 64 static inline void wake(processor * this) { 65 disable_interrupts(); 66 wake_fast(this); 67 enable_interrupts( __cfaabi_dbg_ctx ); 68 } 63 69 64 70 struct event_kernel_t { … … 69 75 extern event_kernel_t * event_kernel; 70 76 71 //extern thread_local coroutine_desc * volatile this_coroutine;72 //extern thread_local thread_desc * volatile this_thread;73 //extern thread_local processor * volatile this_processor;74 75 // extern volatile thread_local bool preemption_in_progress;76 // extern volatile thread_local bool preemption_enabled;77 // extern volatile thread_local unsigned short disable_preempt_count;78 79 77 struct __cfa_kernel_preemption_state_t { 80 78 bool enabled; … … 83 81 }; 84 82 85 extern volatile thread_local __cfa_kernel_preemption_state_t preemption_state ;83 extern volatile thread_local __cfa_kernel_preemption_state_t preemption_state __attribute__ ((tls_model ( "initial-exec" ))); 86 84 87 85 //-----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.