- Timestamp:
- Sep 5, 2024, 3:57:05 PM (3 months ago)
- Branches:
- master
- Children:
- 29c8675
- Parents:
- ad47ec4 (diff), 508cff0 (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. - Location:
- libcfa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/prelude/prototypes.awk
rad47ec4 r9bb6c5f 103 103 104 104 for ( prototype in prototypes ) { 105 # printf( "//\"%s\"\n", prototype )106 105 if ( index( "BT_LAST", prototype ) == 1 ) { 107 106 continue … … 126 125 127 126 # generate function parameter types as macro 128 if ( index( prototype, "VAR" ) != 2 ) { # C-style empty parameters ? 129 for ( p = 0; length( prototype ) > 0; p += 1 ) { # until all parameters types are removed 130 sub( "_", "", prototype) # remove "_" 131 printf( ", ", type ) 132 temp = prototype 133 for ( t = 0; t < N; t += 1 ) { # find longest match 134 type = types[t]; 135 if ( index( prototype, type ) == 1 ) { # found match 136 printf( "BT_%s", type ) 137 sub( type, "", prototype ) 138 break; 139 } # if 140 } # for 141 if ( temp == prototype ) { # no match found for parameter in macro table 142 printf( "\n********** MISSING TYPE \"%s\" **********\n", prototype ) 143 exit 0 127 for ( p = 0; length( prototype ) > 0; p += 1 ) { # until all parameters types are removed 128 sub( "_", "", prototype) # remove "_" 129 printf( ", ", type ) 130 temp = prototype 131 for ( t = 0; t < N; t += 1 ) { # find longest match 132 type = types[t]; 133 if ( index( prototype, type ) == 1 ) { # found match 134 printf( "BT_%s", type ) 135 sub( type, "", prototype ) 136 break; 144 137 } # if 145 138 } # for 146 } # if 139 if ( temp == prototype ) { # no match found for parameter in macro table 140 printf( "\n********** MISSING TYPE \"%s\" **********\n", prototype ) 141 exit 0 142 } # if 143 } # for 147 144 printf( ")\n" ) 148 145 } # for -
libcfa/src/concurrency/future.hfa
rad47ec4 r9bb6c5f 88 88 if ( s.clause_status == 0p ) // poke in result so that woken threads do not need to reacquire any locks 89 89 copy_T( result, *(((future_node(T) &)s).my_result) ); 90 90 91 91 wake_one( waiters, s ); 92 92 } … … 146 146 } 147 147 unlock( lock ); 148 148 149 149 return [ret_val, false]; 150 150 } … … 154 154 155 155 // check if we can complete operation. If so race to establish winner in special OR case 156 if ( !s.park_counter && state != FUTURE_EMPTY ) { 156 if ( !s.park_counter && state != FUTURE_EMPTY ) { 157 157 if ( !__make_select_node_available( s ) ) { // we didn't win the race so give up on registering 158 158 unlock( lock ); … … 180 180 return false; 181 181 } 182 182 183 183 bool on_selected( future(T) & this, select_node & node ) { return true; } 184 184 } -
libcfa/src/iostream.cfa
rad47ec4 r9bb6c5f 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 17 12:31:47202413 // Update Count : 20 3812 // Last Modified On : Wed Sep 4 11:30:12 2024 13 // Update Count : 2040 14 14 // 15 15 … … 512 512 if ( cnt == 1 && f.flags.left ) { wd = f.wd; f.wd = maxdig; } // copy f.wd and reset for printing middle chunk 513 513 // printf( "R val:%#lx(%lu) wd:%u pc:%u base:%c neg:%d pc:%d left:%d nobsdp:%d sign:%d pad0:%d\n", 514 // f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 ); 514 // f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 ); 515 515 (ostype &)(os | f); 516 516 if ( cnt == 1 ) { … … 554 554 if ( f.flags.neg ) f.val = -f.val; 555 555 // printf( "L val:%#lx(%lu) wd:%u pc:%u base:%c neg:%d pc:%d left:%d nobsdp:%d sign:%d pad0:%d\n", 556 // f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 ); 556 // f.val, f.val, f.wd, f.pc, f.base, f.flags.neg, f.flags.pc, f.flags.left, f.flags.nobsdp, f.flags.sign, f.flags.pad0 ); 557 557 (ostype &)(os | f); 558 558 … … 597 597 "y", "z", "a", "f", "p", "n", "u", "m", "", 598 598 "K", "M", "G", "T", "P", "E", "Z", "Y" 599 }; 599 }; 600 600 #define SUFFIXES_START (-24) /* Smallest power for which there is a suffix defined. */ 601 601 #define SUFFIXES_END (SUFFIXES_START + (int)((sizeof(suffixes) / sizeof(char *) - 1) * 3)) … … 1064 1064 else args = fmt( is, fmtstr, s, &len ); 1065 1065 // fprintf( stderr, "cstr %s %d %d %d\n", fmtstr, args, len, f.cstr.wd ); 1066 1067 // No data read and eof is on => true eof so raise exception. 1068 if ( len == 0 && eof( is ) ) throwResume ExceptionInst( end_of_file ); 1069 1066 1070 if ( check && len >= rwd && ! eof( is ) ) { // might not fit 1067 1071 char peek; … … 1087 1091 else args = fmt( is, fmtstr, s, &len ); 1088 1092 1093 // No data read and eof is on => true eof so raise exception. 1094 if ( len == 0 && eof( is ) ) throwResume ExceptionInst( end_of_file ); 1095 1089 1096 if ( check && len == rwd && ! eof( is ) ) { // might not fit 1090 1097 char peek; … … 1106 1113 else args = fmt( is, fmtstr, s, &len ); 1107 1114 // fprintf( stderr, "incl/excl %s \"%s\" %d %d %d %d %d %c\n", fmtstr, s, args, wd, len, eof( is ), check, s[wd] ); 1115 1116 // No data read and eof is on => true eof so raise exception. 1117 if ( len == 0 && eof( is ) ) throwResume ExceptionInst( end_of_file ); 1118 1108 1119 if ( check && len == rwd && ! eof( is ) ) { // might not fit 1109 1120 // fprintf( stderr, "overflow\n" );
Note: See TracChangeset
for help on using the changeset viewer.