Changeset ebf8ca5 for libcfa/src
- 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)
- Location:
- libcfa/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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 -
libcfa/src/iostream.cfa
raa122e9 rebf8ca5 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 25 18:05:49202213 // Update Count : 135 412 // Last Modified On : Sat Aug 27 15:04:15 2022 13 // Update Count : 1358 14 14 // 15 15 … … 765 765 fmtuc.flags.pc = f.flags.pc; 766 766 fmtuc.flags.nobsdp = f.flags.nobsdp; 767 for ( unsigned int i = 0; f.val[i] != '\0'; i += 1) {767 for ( i; 0 ~ @ : @; f.val[i] != '\0' ) { 768 768 fmtuc.val = f.val[i]; 769 769 // os | fmtuc | nonl; … … 931 931 if ( fmt( is, "%39[0-9]%*[0-9]", s ) == 1 ) { // take first 39 characters, ignore remaining 932 932 ullli = 0; 933 for ( unsigned int i = 0; s[i] != '\0'; i += 1) {933 for ( i; 0 ~ @ : @; s[i] != '\0' ) { 934 934 ullli = ullli * 10 + s[i] - '0'; 935 935 } // for
Note: See TracChangeset
for help on using the changeset viewer.