Changeset 848439f for libcfa/src


Ignore:
Timestamp:
Oct 7, 2020, 4:39:16 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
391c065, 41b8ea4
Parents:
c76bd34
Message:

Fixed newlines and tabs in concurrency/locks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/locks.cfa

    rc76bd34 r848439f  
    7777        if ( owner == kernelTLS.this_thread && !multi_acquisition) {
    7878                fprintf(stderr, "A single acquisition lock holder attempted to reacquire the lock resulting in a deadlock."); // Possibly throw instead
    79         exit(EXIT_FAILURE);
     79                exit(EXIT_FAILURE);
    8080        } else if ( owner != 0p && owner != kernelTLS.this_thread ) {
    8181                append( blocked_threads, kernelTLS.this_thread );
     
    111111        lock( lock __cfaabi_dbg_ctx2 );
    112112        if ( owner == 0p ){ // no owner implies lock isn't held
    113                 fprintf( stderr, "There was an attempt to release a lock that isn't held" ); 
     113                fprintf( stderr, "There was an attempt to release a lock that isn't held" );
    114114                return;
    115115        } else if ( strict_owner && owner != kernelTLS.this_thread ) {
    116                 fprintf( stderr, "A thread other than the owner attempted to release an owner lock" ); 
     116                fprintf( stderr, "A thread other than the owner attempted to release an owner lock" );
    117117                return;
    118118        }
     
    158158    lock( lock __cfaabi_dbg_ctx2 );
    159159        if ( owner == 0p ){ // no owner implies lock isn't held
    160                 fprintf( stderr, "A lock that is not held was passed to a synchronization lock" ); 
     160                fprintf( stderr, "A lock that is not held was passed to a synchronization lock" );
    161161        } else if ( strict_owner && owner != kernelTLS.this_thread ) {
    162                 fprintf( stderr, "A thread other than the owner of a lock passed it to a synchronization lock" ); 
     162                fprintf( stderr, "A thread other than the owner of a lock passed it to a synchronization lock" );
    163163        } else {
    164164                $thread * thrd = pop_head( blocked_threads );
     
    264264                info_thread(L) * popped = pop_head( blocked_threads );
    265265                if(popped != 0p) {
    266                         if( reacquire_after_signal ){ 
     266                        if( reacquire_after_signal ){
    267267                                add_(*popped->lock, popped->t);
    268268                        } else {
     
    282282                        info_thread(L) * popped = pop_head( blocked_threads );
    283283                        if(popped != 0p){
    284                                 if( reacquire_after_signal ){ 
     284                                if( reacquire_after_signal ){
    285285                                        add_(*popped->lock, popped->t);
    286286                                } else {
     
    332332        }
    333333
    334         bool wait( synchronization_lock(L) & this, uintptr_t info, Duration duration ) with(this) { 
     334        bool wait( synchronization_lock(L) & this, uintptr_t info, Duration duration ) with(this) {
    335335                // TODO: ADD INFO
    336336                return wait( this, duration );
     
    368368                queue_info_thread_unlock( this, l, i );
    369369        }
    370        
     370
    371371        bool wait( synchronization_lock(L) & this, L & l, Duration duration ) with(this) {
    372372                timeval tv = { time(0) };
     
    374374                return wait( this, l, t + duration );
    375375        }
    376        
     376
    377377        bool wait( synchronization_lock(L) & this, L & l, uintptr_t info, Duration duration ) with(this) {
    378378                // TODO: ADD INFO
    379379                return wait( this, l, duration );
    380380        }
    381        
     381
    382382        bool wait( synchronization_lock(L) & this, L & l, Time time ) with(this) {
    383383                return false; //default
    384384        }
    385        
     385
    386386        bool wait( synchronization_lock(L) & this, L & l, uintptr_t info, Time time ) with(this) {
    387387                // TODO: ADD INFO
Note: See TracChangeset for help on using the changeset viewer.