Changeset a065f1f for libcfa/src/bits


Ignore:
Timestamp:
Sep 20, 2022, 8:37:17 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
53a768d
Parents:
4520b77e (diff), ef1da0e2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    r4520b77e ra065f1f  
    1313// Created On       : Tue Oct 31 15:14:38 2017
    1414// Last Modified By : Peter A. Buhr
    15 // Last Modified On : Wed Aug 12 14:18:07 2020
    16 // Update Count     : 13
     15// Last Modified On : Mon Sep 19 18:51:53 2022
     16// Update Count     : 17
    1717//
    1818
     
    6060
    6161                disable_interrupts();
    62                 for ( unsigned int i = 1;; i += 1 ) {
     62                for ( i; 1 ~ @ ) {
    6363                        if ( (this.lock == 0) && (__atomic_test_and_set( &this.lock, __ATOMIC_ACQUIRE ) == 0) ) break;
    6464                        #ifndef NOEXPBACK
    6565                                // exponential spin
    66                                 for ( volatile unsigned int s = 0; s < spin; s += 1 ) Pause();
     66                        for ( volatile unsigned int s; 0 ~ spin ) Pause();
    6767
    6868                                // slowly increase by powers of 2
Note: See TracChangeset for help on using the changeset viewer.