Changes in / [cc56283:04a8a54]
- Files:
-
- 5 deleted
- 4 edited
-
libcfa/src/Makefile.am (modified) (1 diff)
-
libcfa/src/concurrency/kernel.cfa (modified) (2 diffs)
-
libcfa/src/concurrency/kernel/startup.cfa (modified) (2 diffs)
-
libcfa/src/concurrency/kernel_private.hfa (modified) (1 diff)
-
tests/io/.expect/io-acquire-no-io.txt (deleted)
-
tests/io/.expect/io-acquire-term-sync.txt (deleted)
-
tests/io/.in/io-acquire-term-sync.txt (deleted)
-
tests/io/io-acquire-no-io.cfa (deleted)
-
tests/io/io-acquire-term-sync.cfa (deleted)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/Makefile.am
rcc56283 r04a8a54 121 121 concurrency/monitor.hfa \ 122 122 concurrency/mutex.hfa \ 123 concurrency/select.hfa \124 123 concurrency/thread.hfa 125 124 -
libcfa/src/concurrency/kernel.cfa
rcc56283 r04a8a54 142 142 extern void __disable_interrupts_hard(); 143 143 extern void __enable_interrupts_hard(); 144 145 static inline void __disable_interrupts_checked() { 146 /* paranoid */ verify( __preemption_enabled() ); 147 disable_interrupts(); 148 /* paranoid */ verify( ! __preemption_enabled() ); 149 } 150 151 static inline void __enable_interrupts_checked( bool poll = true ) { 152 /* paranoid */ verify( ! __preemption_enabled() ); 153 enable_interrupts( poll ); 154 /* paranoid */ verify( __preemption_enabled() ); 155 } 144 156 145 157 … … 764 776 // Unconditionnaly wake a thread 765 777 void __wake_proc(processor * this) { 766 /* paranoid */ verify( ! __preemption_enabled() );767 768 778 __cfadbg_print_safe(runtime_core, "Kernel : waking Processor %p\n", this); 769 779 770 eventfd_t val; 771 val = 1; 772 eventfd_write( this->idle_fd, val ); 773 774 /* paranoid */ verify( ! __preemption_enabled() ); 780 __disable_interrupts_checked(); 781 /* paranoid */ verify( ! __preemption_enabled() ); 782 eventfd_t val; 783 val = 1; 784 eventfd_write( this->idle_fd, val ); 785 __enable_interrupts_checked(); 775 786 } 776 787 -
libcfa/src/concurrency/kernel/startup.cfa
rcc56283 r04a8a54 279 279 // When its coroutine terminates, it return control to the mainThread 280 280 // which is currently here 281 /* paranoid */ verify( !__atomic_load_n(&mainProcessor->do_terminate, __ATOMIC_ACQUIRE) );282 281 __atomic_store_n(&mainProcessor->do_terminate, true, __ATOMIC_RELEASE); 283 __wake_proc( mainProcessor );284 282 __kernel_last_resume( __cfaabi_tls.this_processor ); 285 283 mainThread->self_cor.state = Halted; … … 566 564 extern size_t __page_size; 567 565 void ^?{}(processor & this) with( this ){ 568 /* paranoid */ verify( !__atomic_load_n(&do_terminate, __ATOMIC_ACQUIRE) ); 569 __cfadbg_print_safe(runtime_core, "Kernel : core %p signaling termination\n", &this); 570 571 __atomic_store_n(&do_terminate, true, __ATOMIC_RELAXED); 572 __disable_interrupts_checked(); 566 if( ! __atomic_load_n(&do_terminate, __ATOMIC_ACQUIRE) ) { 567 __cfadbg_print_safe(runtime_core, "Kernel : core %p signaling termination\n", &this); 568 569 __atomic_store_n(&do_terminate, true, __ATOMIC_RELAXED); 573 570 __wake_proc( &this ); 574 __enable_interrupts_checked(); 575 576 wait( terminated);577 /* paranoid */ verify( active_processor() != &this);571 572 wait( terminated ); 573 /* paranoid */ verify( active_processor() != &this); 574 } 578 575 579 576 __destroy_pthread( kernel_thread, this.stack, 0p ); -
libcfa/src/concurrency/kernel_private.hfa
rcc56283 r04a8a54 60 60 extern bool __preemption_enabled(); 61 61 62 static inline void __disable_interrupts_checked() {63 /* paranoid */ verify( __preemption_enabled() );64 disable_interrupts();65 /* paranoid */ verify( ! __preemption_enabled() );66 }67 68 static inline void __enable_interrupts_checked( bool poll = true ) {69 /* paranoid */ verify( ! __preemption_enabled() );70 enable_interrupts( poll );71 /* paranoid */ verify( __preemption_enabled() );72 }73 74 62 //release/wake-up the following resources 75 63 void __thread_finish( thread$ * thrd );
Note:
See TracChangeset
for help on using the changeset viewer.