Ignore:
Timestamp:
Aug 17, 2022, 12:59:42 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
8fca132
Parents:
aec2c022
Message:

Changed scheduler lock to remove one level of pointer.

File:
1 edited

Legend:

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

    raec2c022 rcd3fc46  
    186186union __attribute__((aligned(64))) __scheduler_RWLock_t {
    187187        struct {
     188                __attribute__((aligned(64))) char padding;
     189
    188190                // total cachelines allocated
    189                 unsigned int max;
     191                __attribute__((aligned(64))) unsigned int max;
    190192
    191193                // cachelines currently in use
     
    208210void ^?{}(__scheduler_RWLock_t & this);
    209211
    210 extern __scheduler_RWLock_t * __scheduler_lock;
     212extern __scheduler_RWLock_t __scheduler_lock;
    211213
    212214//-----------------------------------------------------------------------
    213215// Reader side : acquire when using the ready queue to schedule but not
    214216//  creating/destroying queues
    215 static inline void ready_schedule_lock(void) with(__scheduler_lock->lock) {
     217static inline void ready_schedule_lock(void) with(__scheduler_lock.lock) {
    216218        /* paranoid */ verify( ! __preemption_enabled() );
    217219        /* paranoid */ verify( ! kernelTLS().in_sched_lock );
     
    238240}
    239241
    240 static inline void ready_schedule_unlock(void) with(__scheduler_lock->lock) {
     242static inline void ready_schedule_unlock(void) with(__scheduler_lock.lock) {
    241243        /* paranoid */ verify( ! __preemption_enabled() );
    242244        /* paranoid */ verify( data[kernelTLS().sched_id] == &kernelTLS().sched_lock );
     
    259261
    260262        static inline bool ready_mutate_islocked() {
    261                 return __scheduler_lock->lock.write_lock;
     263                return __scheduler_lock.lock.write_lock;
    262264        }
    263265#endif
Note: See TracChangeset for help on using the changeset viewer.