Changeset 9bb6c5f for libcfa/src


Ignore:
Timestamp:
Sep 5, 2024, 3:57:05 PM (13 months ago)
Author:
JiadaL <j82liang@…>
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.
Message:

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

Location:
libcfa/src
Files:
2 edited

Legend:

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

    rad47ec4 r9bb6c5f  
    8888                if ( s.clause_status == 0p ) // poke in result so that woken threads do not need to reacquire any locks
    8989                    copy_T( result, *(((future_node(T) &)s).my_result) );
    90                
     90
    9191                wake_one( waiters, s );
    9292            }
     
    146146            }
    147147            unlock( lock );
    148            
     148
    149149            return [ret_val, false];
    150150        }
     
    154154
    155155            // 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 ) {
    157157                if ( !__make_select_node_available( s ) ) { // we didn't win the race so give up on registering
    158158                    unlock( lock );
     
    180180            return false;
    181181        }
    182                
     182
    183183        bool on_selected( future(T) & this, select_node & node ) { return true; }
    184184        }
  • libcfa/src/iostream.cfa

    rad47ec4 r9bb6c5f  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Aug 17 12:31:47 2024
    13 // Update Count     : 2038
     12// Last Modified On : Wed Sep  4 11:30:12 2024
     13// Update Count     : 2040
    1414//
    1515
     
    512512                if ( cnt == 1 && f.flags.left ) { wd = f.wd; f.wd = maxdig; } // copy f.wd and reset for printing middle chunk
    513513                // 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 );
    515515                (ostype &)(os | f);
    516516                if ( cnt == 1 ) {
     
    554554                if ( f.flags.neg ) f.val = -f.val;
    555555                // 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 );
    557557                (ostype &)(os | f);
    558558
     
    597597        "y", "z", "a", "f", "p", "n", "u", "m", "",
    598598        "K", "M", "G", "T", "P", "E", "Z", "Y"
    599 }; 
     599};
    600600#define SUFFIXES_START (-24) /* Smallest power for which there is a suffix defined. */
    601601#define SUFFIXES_END (SUFFIXES_START + (int)((sizeof(suffixes) / sizeof(char *) - 1) * 3))
     
    10641064                        else args = fmt( is, fmtstr, s, &len );
    10651065                        // 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
    10661070                        if ( check && len >= rwd && ! eof( is ) ) {     // might not fit
    10671071                                char peek;
     
    10871091                                else args = fmt( is, fmtstr, s, &len );
    10881092
     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
    10891096                                if ( check && len == rwd && ! eof( is ) ) {     // might not fit
    10901097                                        char peek;
     
    11061113                                else args = fmt( is, fmtstr, s, &len );
    11071114                                // 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
    11081119                                if ( check && len == rwd && ! eof( is ) ) {     // might not fit
    11091120                                        // fprintf( stderr, "overflow\n" );
Note: See TracChangeset for help on using the changeset viewer.