Ignore:
Timestamp:
Jun 16, 2020, 3:32:00 PM (16 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
04b5cef
Parents:
2073d20
Message:

Minor improvements to alignments and memory layout

File:
1 edited

Legend:

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

    r2073d20 r37ba662  
    6161
    6262// Wrapper around kernel threads
    63 struct processor {
     63struct __attribute__((aligned(128))) processor {
     64        // Main state
    6465        inline __processor_id_t;
    6566
    66         // Main state
     67        // Cluster from which to get threads
     68        struct cluster * cltr;
     69
     70        // Set to true to notify the processor should terminate
     71        volatile bool do_terminate;
     72
    6773        // Coroutine ctx who does keeps the state of the processor
    6874        struct processorCtx_t runner;
    69 
    70         // Cluster from which to get threads
    71         struct cluster * cltr;
    7275
    7376        // Name of the processor
     
    9093        // Idle lock (kernel semaphore)
    9194        __bin_sem_t idle;
    92 
    93         // Termination
    94         // Set to true to notify the processor should terminate
    95         volatile bool do_terminate;
    9695
    9796        // Termination synchronisation (user semaphore)
     
    153152//TODO adjust cache size to ARCHITECTURE
    154153// Structure holding the relaxed ready queue
    155 struct __attribute__((aligned(128))) __ready_queue_t {
     154struct __ready_queue_t {
    156155        // Data tracking how many/which lanes are used
    157156        // Aligned to 128 for cache locality
     
    162161        // used can change on each push/pop but this data
    163162        // only changes on shrink/grow
    164         struct __attribute__((aligned(64))) {
     163        struct {
    165164                // Arary of lanes
    166165                __intrusive_lane_t * volatile data;
     
    176175//-----------------------------------------------------------------------------
    177176// Cluster
    178 struct cluster {
     177struct __attribute__((aligned(128))) cluster {
    179178        // Ready queue for threads
    180179        __ready_queue_t ready_queue;
Note: See TracChangeset for help on using the changeset viewer.