Ignore:
Timestamp:
Apr 30, 2020, 3:27:11 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
9987d79
Parents:
c59a346
Message:

Added new implementation of io_uring that uses user-thread

File:
1 edited

Legend:

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

    rc59a346 rf6660520  
    266266        threads{ __get };
    267267
    268         __kernel_io_startup( this );
     268        __kernel_io_startup( this, &this == mainCluster );
    269269
    270270        doregister(this);
     
    272272
    273273void ^?{}(cluster & this) {
    274         __kernel_io_shutdown( this );
     274        __kernel_io_shutdown( this, &this == mainCluster );
    275275
    276276        unregister(this);
     
    784784
    785785
    786 
    787786        // THE SYSTEM IS NOW COMPLETELY RUNNING
    788         __cfaabi_dbg_print_safe("Kernel : Started\n--------------------------------------------------\n\n");
     787
     788
     789        // Now that the system is up, finish creating systems that need threading
     790        __kernel_io_finish_start( *mainCluster );
     791
     792
     793        __cfadbg_print_safe(runtime_core, "Kernel : Started\n--------------------------------------------------\n\n");
    789794
    790795        verify( ! kernelTLS.preemption_state.enabled );
     
    794799
    795800static void __kernel_shutdown(void) {
    796         __cfaabi_dbg_print_safe("\n--------------------------------------------------\nKernel : Shutting down\n");
     801        //Before we start shutting things down, wait for systems that need threading to shutdown
     802        __kernel_io_prepare_stop( *mainCluster );
    797803
    798804        /* paranoid */ verify( TL_GET( preemption_state.enabled ) );
    799805        disable_interrupts();
    800806        /* paranoid */ verify( ! kernelTLS.preemption_state.enabled );
     807
     808        __cfadbg_print_safe(runtime_core, "\n--------------------------------------------------\nKernel : Shutting down\n");
    801809
    802810        // SKULLDUGGERY: Notify the mainProcessor it needs to terminates.
Note: See TracChangeset for help on using the changeset viewer.