Ignore:
Timestamp:
Jun 19, 2020, 3:49:43 PM (20 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
68f36f4
Parents:
04b5cef
Message:

Fixed idle sleep to no-longer use a spinlock, broke registration and gdbtools in the process

File:
1 edited

Legend:

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

    r04b5cef r64a7146  
    2323#include "coroutine.hfa"
    2424
     25#include "containers/stackLockFree.hfa"
     26
    2527extern "C" {
    2628#include <pthread.h>
     
    101103
    102104        // Link lists fields
    103         struct __dbg_node_cltr {
    104                 processor * next;
    105                 processor * prev;
    106         } node;
     105        Link(processor) link;
    107106
    108107#ifdef __CFA_DEBUG__
     
    119118static inline void  ?{}(processor & this, const char name[]) { this{name, *mainCluster }; }
    120119
    121 static inline [processor *&, processor *& ] __get( processor & this ) __attribute__((const)) { return this.node.[next, prev]; }
     120static inline Link(processor) * getNext( processor * this ) { return &this->link; }
    122121
    123122//-----------------------------------------------------------------------------
     
    185184        Duration preemption_rate;
    186185
    187         // List of processors
    188         __spinlock_t idle_lock;
    189         __dllist_t(struct processor) procs;
    190         __dllist_t(struct processor) idles;
     186        // List of idle processors
     187        StackLF(processor) idles;
    191188        unsigned int nprocessors;
    192189
Note: See TracChangeset for help on using the changeset viewer.