Ignore:
Timestamp:
Nov 14, 2022, 11:52:44 AM (3 years ago)
Author:
caparson <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
7d9598d8
Parents:
b77f0e1 (diff), 19a8c40 (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.hfa

    rb77f0e1 r63be3387  
    6464        // 1 - means the proc should wake-up immediately
    6565        // FD - means the proc is going asleep and should be woken by writing to the FD.
     66        //      The FD value should always be the evfd field just below.
    6667        volatile int sem;
    6768
     
    6970        int evfd;
    7071
    71         // buffer into which the proc will read from evfd
    72         // unused if not using io_uring for idle sleep
    73         void * rdbuf;
    74 
    75         // future use to track the read of the eventfd
    76         // unused if not using io_uring for idle sleep
    77         io_future_t * ftr;
    78 
     72        // Used for debugging, should be removed eventually.
    7973        volatile unsigned long long wake__time;
    8074        volatile unsigned long long sleep_time;
     
    160154// P9_EMBEDDED( processor, dlink(processor) )
    161155static inline tytagref( dlink(processor), dlink(processor) ) ?`inner( processor & this ) {
    162     dlink(processor) & b = this.link;
    163     tytagref( dlink(processor), dlink(processor) ) result = { b };
    164     return result;
     156        dlink(processor) & b = this.link;
     157        tytagref( dlink(processor), dlink(processor) ) result = { b };
     158        return result;
    165159}
    166160
     
    256250        // List of threads
    257251        __spinlock_t thread_list_lock;
    258         __dllist_t(struct thread$) threads;
     252        dlist(struct thread$, struct __thread_user_link) threads;
    259253        unsigned int nthreads;
    260254
     
    269263                io_context_params params;
    270264        } io;
     265
     266        struct {
     267                struct processor ** procs;
     268                unsigned cnt;
     269        } managed;
    271270
    272271        #if !defined(__CFA_NO_STATISTICS__)
     
    298297static inline struct cluster   * active_cluster  () { return publicTLS_get( this_processor )->cltr; }
    299298
     299// set the number of internal processors
     300// these processors are in addition to any explicitly declared processors
     301unsigned set_concurrency( cluster & this, unsigned new_count );
     302
    300303#if !defined(__CFA_NO_STATISTICS__)
    301304        void print_stats_now( cluster & this, int flags );
Note: See TracChangeset for help on using the changeset viewer.