Ignore:
Timestamp:
Nov 2, 2020, 12:44:43 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
58688bf, 82f791f
Parents:
f7136f7
Message:

Removed unpark and added support for unpark from the kernel (removing the distinction between the two

File:
1 edited

Legend:

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

    rf7136f7 re873838  
    3838// FwdDeclarations : timeout handlers
    3939static void preempt( processor   * this );
    40 static void timeout( struct __processor_id_t * id, $thread * this );
     40static void timeout( $thread * this );
    4141
    4242// FwdDeclarations : Signal handlers
     
    9191
    9292// Tick one frame of the Discrete Event Simulation for alarms
    93 static void tick_preemption( struct __processor_id_t * id ) {
     93static void tick_preemption(void) {
    9494        alarm_node_t * node = 0p;                                                       // Used in the while loop but cannot be declared in the while condition
    9595        alarm_list_t * alarms = &event_kernel->alarms;          // Local copy for ease of reading
     
    109109                }
    110110                else {
    111                         timeout( id, node->thrd );
     111                        timeout( node->thrd );
    112112                }
    113113
     
    270270
    271271// reserved for future use
    272 static void timeout( struct __processor_id_t * id, $thread * this ) {
     272static void timeout( $thread * this ) {
    273273        #if !defined( __CFA_NO_STATISTICS__ )
    274274                kernelTLS.this_stats = this->curr_cluster->stats;
    275275        #endif
    276         __unpark( id, this );
     276        unpark( this );
    277277}
    278278
     
    413413        id.full_proc = false;
    414414        id.id = doregister(&id);
     415        kernelTLS.this_proc_id = &id;
    415416
    416417        // Block sigalrms to control when they arrive
     
    458459                        // __cfaabi_dbg_print_safe( "Kernel : Preemption thread tick\n" );
    459460                        lock( event_kernel->lock __cfaabi_dbg_ctx2 );
    460                         tick_preemption( &id );
     461                        tick_preemption();
    461462                        unlock( event_kernel->lock );
    462463                        break;
Note: See TracChangeset for help on using the changeset viewer.