Ignore:
File:
1 edited

Legend:

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

    rbe5f0a5 rc18bf9e  
    122122
    123123                // Some one else has the monitor, wait in line for it
    124                 /* paranoid */ verify( thrd->user_link.next == 0p );
     124                /* paranoid */ verify( thrd->link.next == 0p );
    125125                append( this->entry_queue, thrd );
    126                 /* paranoid */ verify( thrd->user_link.next == 1p );
     126                /* paranoid */ verify( thrd->link.next == 1p );
    127127
    128128                unlock( this->lock );
     
    233233
    234234                // Some one else has the monitor, wait in line for it
    235                 /* paranoid */ verify( thrd->user_link.next == 0p );
     235                /* paranoid */ verify( thrd->link.next == 0p );
    236236                append( this->entry_queue, thrd );
    237                 /* paranoid */ verify( thrd->user_link.next == 1p );
     237                /* paranoid */ verify( thrd->link.next == 1p );
    238238                unlock( this->lock );
    239239
     
    791791        thread$ * new_owner = pop_head( this->entry_queue );
    792792        /* paranoid */ verifyf( !this->owner || active_thread() == this->owner, "Expected owner to be %p, got %p (r: %i, m: %p)", active_thread(), this->owner, this->recursion, this );
    793         /* paranoid */ verify( !new_owner || new_owner->user_link.next == 0p );
     793        /* paranoid */ verify( !new_owner || new_owner->link.next == 0p );
    794794        __set_owner( this, new_owner );
    795795
     
    935935        __queue_t(thread$) & entry_queue = monitors[0]->entry_queue;
    936936
    937         #if defined( __CFA_WITH_VERIFY__ )
    938                 thread$ * last = 0p;
    939         #endif
    940937        // For each thread in the entry-queue
    941938        for(    thread$ ** thrd_it = &entry_queue.head;
    942939                (*thrd_it) != 1p;
    943                 thrd_it = &get_next(**thrd_it)
     940                thrd_it = &(*thrd_it)->link.next
    944941        ) {
    945                 thread$ * curr = *thrd_it;
    946 
    947                 /* paranoid */ verifyf( !last || last->user_link.next == curr, "search not making progress, from %p (%p) to %p", last, last->user_link.next, curr );
    948                 /* paranoid */ verifyf( curr != last, "search not making progress, from %p to %p", last, curr );
    949 
    950942                // For each acceptable check if it matches
    951943                int i = 0;
     
    954946                for( __acceptable_t * it = begin; it != end; it++, i++ ) {
    955947                        // Check if we have a match
    956                         if( *it == curr->monitors ) {
     948                        if( *it == (*thrd_it)->monitors ) {
    957949
    958950                                // If we have a match return it
     
    961953                        }
    962954                }
    963 
    964                 #if defined( __CFA_WITH_VERIFY__ )
    965                         last = curr;
    966                 #endif
    967955        }
    968956
     
    10371025
    10381026                // Some one else has the monitor, wait in line for it
    1039                 /* paranoid */ verify( thrd->user_link.next == 0p );
     1027                /* paranoid */ verify( thrd->link.next == 0p );
    10401028                append( this->entry_queue, thrd );
    1041                 /* paranoid */ verify( thrd->user_link.next == 1p );
     1029                /* paranoid */ verify( thrd->link.next == 1p );
    10421030
    10431031                unlock( this->lock );
Note: See TracChangeset for help on using the changeset viewer.