Ignore:
File:
1 edited

Legend:

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

    r8cd5434 r431cd4f  
    4949
    5050// Processor id, required for scheduling threads
    51 
     51struct __processor_id_t {
     52        unsigned id:24;
     53
     54        #if !defined(__CFA_NO_STATISTICS__)
     55                struct __stats_t * stats;
     56        #endif
     57};
    5258
    5359coroutine processorCtx_t {
     
    5763// Wrapper around kernel threads
    5864struct __attribute__((aligned(128))) processor {
     65        // Main state
     66        inline __processor_id_t;
     67
    5968        // Cluster from which to get threads
    6069        struct cluster * cltr;
     
    8190        pthread_t kernel_thread;
    8291
    83         // Unique id for the processor (not per cluster)
    84         unsigned unique_id;
    85 
    8692        struct {
    8793                $io_context * ctx;
     
    117123        } init;
    118124
    119         struct KernelThreadData * local_data;
    120 
    121125        #if !defined(__CFA_NO_STATISTICS__)
    122126                int print_stats;
     
    148152
    149153// Aligned timestamps which are used by the relaxed ready queue
    150 struct __attribute__((aligned(128))) __timestamp_t {
    151         volatile unsigned long long tv;
    152 };
    153 
    154 static inline void  ?{}(__timestamp_t & this) { this.tv = 0; }
    155 static inline void ^?{}(__timestamp_t & this) {}
     154struct __attribute__((aligned(128))) __timestamp_t;
     155void  ?{}(__timestamp_t & this);
     156void ^?{}(__timestamp_t & this);
    156157
    157158//TODO adjust cache size to ARCHITECTURE
     
    176177void  ?{}(__ready_queue_t & this);
    177178void ^?{}(__ready_queue_t & this);
    178 #if !defined(__CFA_NO_STATISTICS__)
    179         unsigned cnt(const __ready_queue_t & this, unsigned idx);
    180 #endif
    181179
    182180// Idle Sleep
Note: See TracChangeset for help on using the changeset viewer.