Changeset bd72c28


Ignore:
Timestamp:
Mar 30, 2023, 4:27:13 PM (13 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
c7f6786
Parents:
9082d7e8
Message:

fixed build issue caused by globals

File:
1 edited

Legend:

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

    r9082d7e8 rbd72c28  
    243243}
    244244
    245 const int __go_mtx_spins = 4;
    246 const int __go_mtx_pauses = 30;
    247245// if this is called recursively IT WILL DEADLOCK!!!!!
    248246static inline void lock(go_mutex & this) with(this) {
     
    254252    init_state = state;
    255253    for (;;) {
    256         for( int i = 0; i < __go_mtx_spins; i++ ) {
     254        for( int i = 0; i < 4; i++ ) {
    257255            while( !val ) { // lock unlocked
    258256                state = 0;
    259257                if (internal_try_lock(this, state, init_state)) return;
    260258            }
    261             for (int i = 0; i < __go_mtx_pauses; i++) Pause();
     259            for (int i = 0; i < 30; i++) Pause();
    262260        }
    263261
Note: See TracChangeset for help on using the changeset viewer.