Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel.cfa

    r57c764c4 r1c40091  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun 20 17:21:23 2019
    13 // Update Count     : 25
     12// Last Modified On : Thu Nov 21 16:46:59 2019
     13// Update Count     : 27
    1414//
    1515
     
    133133        NULL,
    134134        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 }
    137136};
    138137
     
    261260//Main of the processor contexts
    262261void main(processorCtx_t & runner) {
    263         // Because of a bug, we couldn't initialized the seed on construction
    264         // Do it here
    265         kernelTLS.rand_seed ^= rdtscl();
    266 
    267262        processor * this = runner.proc;
    268263        verify(this);
     
    824819        if(thrd) {
    825820                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 );
    827822
    828823                if ( &thrd->self_cor != thrd->curr_cor ) {
    829824                        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 );
    831826                }
    832827                else {
    833                         __cfaabi_dbg_bits_write( ".\n", 2 );
     828                        __cfaabi_bits_write( STDERR_FILENO, ".\n", 2 );
    834829                }
    835830        }
    836831        else {
    837832                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 );
    839834        }
    840835}
     
    847842
    848843extern "C" {
    849         void __cfaabi_dbg_bits_acquire() {
     844        void __cfaabi_bits_acquire() {
    850845                lock( kernel_debug_lock __cfaabi_dbg_ctx2 );
    851846        }
    852847
    853         void __cfaabi_dbg_bits_release() {
     848        void __cfaabi_bits_release() {
    854849                unlock( kernel_debug_lock );
    855850        }
Note: See TracChangeset for help on using the changeset viewer.