Ignore:
Timestamp:
Oct 3, 2022, 4:37:59 PM (21 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master
Children:
d1cd4c4
Parents:
890f67a
Message:

Changed ready-queue so I can easily change the averaging algorithm.
Changed averaging to use logscale.

File:
1 edited

Legend:

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

    r890f67a r31c967b  
    4949#endif
    5050
     51// #define READYQ_USE_LINEAR_AVG
     52#define READYQ_USE_LOGDBL_AVG
     53// #define READYQ_USE_LOGINT_AVG
     54
     55#if   defined(READYQ_USE_LINEAR_AVG)
     56typedef unsigned long long __readyQ_avg_t;
     57#elif defined(READYQ_USE_LOGDBL_AVG)
     58typedef double __readyQ_avg_t;
     59#elif defined(READYQ_USE_LOGDBL_AVG)
     60typedef unsigned long long __readyQ_avg_t;
     61#else
     62#error must pick a scheme for averaging
     63#endif
     64
    5165//-----------------------------------------------------------------------------
    5266// Scheduler
     67union __attribute__((aligned(64))) __timestamp_t {
     68        struct {
     69                volatile unsigned long long tv;
     70                volatile __readyQ_avg_t ma;
     71        } t;
     72        char __padding[192];
     73};
     74
    5375extern "C" {
    5476        void disable_interrupts() OPTIONAL_THREAD;
Note: See TracChangeset for help on using the changeset viewer.