- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.cfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r57c764c4 r1c40091 10 10 // Created On : Tue Jan 17 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 20 17:21:23201913 // Update Count : 2 512 // Last Modified On : Thu Nov 21 16:46:59 2019 13 // Update Count : 27 14 14 // 15 15 … … 133 133 NULL, 134 134 NULL, 135 { 1, false, false }, 136 6u //this should be seeded better but due to a bug calling rdtsc doesn't work 135 { 1, false, false } 137 136 }; 138 137 … … 261 260 //Main of the processor contexts 262 261 void main(processorCtx_t & runner) { 263 // Because of a bug, we couldn't initialized the seed on construction264 // Do it here265 kernelTLS.rand_seed ^= rdtscl();266 267 262 processor * this = runner.proc; 268 263 verify(this); … … 824 819 if(thrd) { 825 820 int len = snprintf( abort_text, abort_text_size, "Error occurred while executing thread %.256s (%p)", thrd->self_cor.name, thrd ); 826 __cfaabi_ dbg_bits_write(abort_text, len );821 __cfaabi_bits_write( STDERR_FILENO, abort_text, len ); 827 822 828 823 if ( &thrd->self_cor != thrd->curr_cor ) { 829 824 len = snprintf( abort_text, abort_text_size, " in coroutine %.256s (%p).\n", thrd->curr_cor->name, thrd->curr_cor ); 830 __cfaabi_ dbg_bits_write(abort_text, len );825 __cfaabi_bits_write( STDERR_FILENO, abort_text, len ); 831 826 } 832 827 else { 833 __cfaabi_ dbg_bits_write(".\n", 2 );828 __cfaabi_bits_write( STDERR_FILENO, ".\n", 2 ); 834 829 } 835 830 } 836 831 else { 837 832 int len = snprintf( abort_text, abort_text_size, "Error occurred outside of any thread.\n" ); 838 __cfaabi_ dbg_bits_write(abort_text, len );833 __cfaabi_bits_write( STDERR_FILENO, abort_text, len ); 839 834 } 840 835 } … … 847 842 848 843 extern "C" { 849 void __cfaabi_ dbg_bits_acquire() {844 void __cfaabi_bits_acquire() { 850 845 lock( kernel_debug_lock __cfaabi_dbg_ctx2 ); 851 846 } 852 847 853 void __cfaabi_ dbg_bits_release() {848 void __cfaabi_bits_release() { 854 849 unlock( kernel_debug_lock ); 855 850 }
Note:
See TracChangeset
for help on using the changeset viewer.