Changeset ebf8ca5 for libcfa/src/bits
- Timestamp:
- Sep 19, 2022, 6:25:23 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- 23a08aa0
- Parents:
- aa122e9
- git-author:
- Peter A. Buhr <pabuhr@…> (09/19/22 18:21:09)
- git-committer:
- Peter A. Buhr <pabuhr@…> (09/19/22 18:25:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/bits/locks.hfa ¶
raa122e9 rebf8ca5 13 13 // Created On : Tue Oct 31 15:14:38 2017 14 14 // Last Modified By : Peter A. Buhr 15 // Last Modified On : Wed Aug 12 14:18:07 202016 // Update Count : 1 315 // Last Modified On : Sat Aug 27 15:06:39 2022 16 // Update Count : 15 17 17 // 18 18 … … 32 32 extern void disable_interrupts() OPTIONAL_THREAD; 33 33 extern void enable_interrupts( bool poll = true ) OPTIONAL_THREAD; 34 extern void poll_interrupts() OPTIONAL_THREAD; 34 35 #define __cfaabi_dbg_record_lock(x, y) 35 36 } … … 59 60 60 61 disable_interrupts(); 61 for ( unsigned int i = 1;; i += 1) {62 for ( i; 1 ~ @ ) { 62 63 if ( (this.lock == 0) && (__atomic_test_and_set( &this.lock, __ATOMIC_ACQUIRE ) == 0) ) break; 63 64 #ifndef NOEXPBACK 64 65 // exponential spin 65 for ( volatile unsigned int s = 0; s < spin; s += 1) Pause();66 for ( volatile unsigned int s; 0 ~ spin ) Pause(); 66 67 67 68 // slowly increase by powers of 2
Note: See TracChangeset
for help on using the changeset viewer.