Ignore:
Timestamp:
Jan 25, 2022, 4:54:35 PM (2 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
6b2d444, a488783, f681823
Parents:
f57f6ea0 (diff), 4fcbf26 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    rf57f6ea0 r97fed44  
    3434#include "kernel_private.hfa"
    3535#include "startup.hfa"          // STARTUP_PRIORITY_XXX
     36#include "limits.hfa"
    3637#include "math.hfa"
    3738
     
    177178
    178179
    179 
    180180//=============================================================================================
    181181// Kernel Setup logic
     
    515515        this.rdq.its = 0;
    516516        this.rdq.itr = 0;
    517         this.rdq.id  = -1u;
    518         this.rdq.target = -1u;
    519         this.rdq.last = -1u;
    520         this.rdq.cutoff = 0ull;
     517        this.rdq.id  = MAX;
     518        this.rdq.target = MAX;
     519        this.rdq.last = MAX;
     520        this.rdq.cpu = 0;
     521        // this.rdq.cutoff = 0ull;
    521522        do_terminate = false;
    522523        preemption_alarm = 0p;
     
    536537        }
    537538
     539        this.idle_wctx.fd = 0;
     540
     541        // I'm assuming these two are reserved for standard input and output
     542        // so I'm using them as sentinels with idle_wctx.
     543        /* paranoid */ verify( this.idle_fd != 0 );
     544        /* paranoid */ verify( this.idle_fd != 1 );
     545
    538546        #if !defined(__CFA_NO_STATISTICS__)
    539547                print_stats = 0;
     
    589597// Cluster
    590598static void ?{}(__cluster_proc_list & this) {
    591         this.fd    = 0;
     599        this.fdw   = 0p;
    592600        this.idle  = 0;
    593601        this.total = 0;
     
    686694        uint_fast32_t last_size;
    687695        [this->unique_id, last_size] = ready_mutate_register();
     696
     697                this->rdq.cpu = __kernel_getcpu();
    688698
    689699                this->cltr->procs.total += 1u;
Note: See TracChangeset for help on using the changeset viewer.