Ignore:
File:
1 edited

Legend:

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

    r1c40091 r57c764c4  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 21 16:46:59 2019
    13 // Update Count     : 27
     12// Last Modified On : Thu Jun 20 17:21:23 2019
     13// Update Count     : 25
    1414//
    1515
     
    133133        NULL,
    134134        NULL,
    135         { 1, false, false }
     135        { 1, false, false },
     136        6u //this should be seeded better but due to a bug calling rdtsc doesn't work
    136137};
    137138
     
    260261//Main of the processor contexts
    261262void 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
    262267        processor * this = runner.proc;
    263268        verify(this);
     
    819824        if(thrd) {
    820825                int len = snprintf( abort_text, abort_text_size, "Error occurred while executing thread %.256s (%p)", thrd->self_cor.name, thrd );
    821                 __cfaabi_bits_write( STDERR_FILENO, abort_text, len );
     826                __cfaabi_dbg_bits_write( abort_text, len );
    822827
    823828                if ( &thrd->self_cor != thrd->curr_cor ) {
    824829                        len = snprintf( abort_text, abort_text_size, " in coroutine %.256s (%p).\n", thrd->curr_cor->name, thrd->curr_cor );
    825                         __cfaabi_bits_write( STDERR_FILENO, abort_text, len );
     830                        __cfaabi_dbg_bits_write( abort_text, len );
    826831                }
    827832                else {
    828                         __cfaabi_bits_write( STDERR_FILENO, ".\n", 2 );
     833                        __cfaabi_dbg_bits_write( ".\n", 2 );
    829834                }
    830835        }
    831836        else {
    832837                int len = snprintf( abort_text, abort_text_size, "Error occurred outside of any thread.\n" );
    833                 __cfaabi_bits_write( STDERR_FILENO, abort_text, len );
     838                __cfaabi_dbg_bits_write( abort_text, len );
    834839        }
    835840}
     
    842847
    843848extern "C" {
    844         void __cfaabi_bits_acquire() {
     849        void __cfaabi_dbg_bits_acquire() {
    845850                lock( kernel_debug_lock __cfaabi_dbg_ctx2 );
    846851        }
    847852
    848         void __cfaabi_bits_release() {
     853        void __cfaabi_dbg_bits_release() {
    849854                unlock( kernel_debug_lock );
    850855        }
Note: See TracChangeset for help on using the changeset viewer.