Ignore:
Timestamp:
Sep 20, 2017, 2:07:57 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0895cba
Parents:
f980549
Message:

Refactoring monitor code in prevision for proper waitfor support

  • added monitor group struct
  • else and timeout now return negative results
File:
1 edited

Legend:

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

    rf980549 rb18830e  
    106106
    107107void ?{}( thread_desc & this, current_stack_info_t * info) {
    108         (this.cor){ info };
     108        (this.self_cor){ info };
    109109}
    110110
     
    115115void ?{}(processorCtx_t & this, processor * proc) {
    116116        (this.__cor){ "Processor" };
    117         this.__cor.starter = &mainThread->cor;
     117        this.__cor.starter = &mainThread->self_cor;
    118118        this.proc = proc;
    119119        proc->runner = &this;
     
    328328        // if( !thrd ) return;
    329329        verify( thrd );
    330         verify( thrd->cor.state != Halted );
     330        verify( thrd->self_cor.state != Halted );
    331331
    332332        verify( disable_preempt_count > 0 );
     
    373373        assert(thrd);
    374374        disable_interrupts();
    375         assert( thrd->cor.state != Halted );
     375        assert( thrd->self_cor.state != Halted );
    376376        this_processor->finish.action_code = Schedule;
    377377        this_processor->finish.thrd = thrd;
     
    466466        this_processor = mainProcessor;
    467467        this_thread = mainThread;
    468         this_coroutine = &mainThread->cor;
     468        this_coroutine = &mainThread->self_cor;
    469469
    470470        // Enable preemption
     
    547547        thread_desc * thrd = kernel_data;
    548548
    549         int len = snprintf( abort_text, abort_text_size, "Error occurred while executing task %.256s (%p)", thrd->cor.name, thrd );
     549        int len = snprintf( abort_text, abort_text_size, "Error occurred while executing task %.256s (%p)", thrd->self_cor.name, thrd );
    550550        __lib_debug_write( STDERR_FILENO, abort_text, len );
    551551
Note: See TracChangeset for help on using the changeset viewer.