Changeset 4cc9b13


Ignore:
Timestamp:
Sep 25, 2017, 11:34:18 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
596bc0a
Parents:
e2f7bc3
Message:

Added waitfor test for else clauses and fixed corresponding errors

Location:
src
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/invoke.h

    re2f7bc3 r4cc9b13  
    125125
    126126            static inline bool ?==?( const __monitor_group_t & lhs, const __monitor_group_t & rhs ) {
     127                  if( (lhs.list != 0) != (rhs.list != 0) ) return false;
    127128                  if( lhs.size != rhs.size ) return false;
    128129                  if( lhs.func != rhs.func ) return false;
  • src/libcfa/concurrency/monitor.c

    re2f7bc3 r4cc9b13  
    431431        short actual_count = aggregate( mon_storage, mask );
    432432
     433        if(actual_count == 0) return;
     434
    433435        // Create storage for monitor context
    434436        monitor_ctx( mon_storage, actual_count );
     
    455457
    456458
    457         if( duration == 0 ) return -1;
     459        if( duration == 0 ) {
     460                unlock_all( locks, count );
     461                return;
     462        }
    458463
    459464
     
    642647        for(    thread_desc ** thrd_it = &entry_queue->head;
    643648                *thrd_it;
    644                 thrd_it = &(*thrd_it)->next)
    645         {
     649                thrd_it = &(*thrd_it)->next
     650        ) {
    646651                // For each acceptable check if it matches
    647                 int i;
     652                int i = 0;
    648653                __acceptable_t * end = mask.clauses + mask.size;
    649654                for( __acceptable_t * it = mask.clauses; it != end; it++, i++ ) {
Note: See TracChangeset for help on using the changeset viewer.