Ignore:
File:
1 edited

Legend:

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

    r4aa2fb2 rc81ebf9  
    5656                else if( this->owner == thrd) {
    5757                        //We already have the monitor, just not how many times we took it
    58                         verify( this->recursion > 0 );
     58                        assert( this->recursion > 0 );
    5959                        this->recursion += 1;
    6060                }
     
    7878                lock( &this->lock );
    7979
     80                thread_desc * thrd = this_thread();
     81
    8082                LIB_DEBUG_PRINT_SAFE("%p Leaving %p (o: %p, r: %i)\n", thrd, this, this->owner, this->recursion);
    81                 verifyf( this_thread() == this->owner, "Expected owner to be %p, got %p (r: %i)", this_thread(), this->owner, this->recursion );
     83                assertf( thrd == this->owner, "Expected owner to be %p, got %p (r: %i)", thrd, this->owner, this->recursion );
    8284
    8385                //Leaving a recursion level, decrement the counter
     
    165167        //Check that everything is as expected
    166168        assertf( this->monitors != NULL, "Waiting with no monitors (%p)", this->monitors );
    167         verifyf( this->monitor_count != 0, "Waiting with 0 monitors (%i)", this->monitor_count );
    168         verifyf( this->monitor_count < 32u, "Excessive monitor count (%i)", this->monitor_count );
     169        assertf( this->monitor_count != 0, "Waiting with 0 monitors (%i)", this->monitor_count );
     170        assertf( this->monitor_count < 32u, "Excessive monitor count (%i)", this->monitor_count );
    169171
    170172        unsigned short count = this->monitor_count;
     
    227229
    228230        //Check that everything is as expected
    229         verify( this->monitors );
    230         verify( this->monitor_count != 0 );
     231        assert( this->monitors );
     232        assert( this->monitor_count != 0 );
    231233
    232234        unsigned short count = this->monitor_count;
     
    276278
    277279        //Check that everything is as expected
    278         verifyf( this->monitors != NULL, "Waiting with no monitors (%p)", this->monitors );
    279         verifyf( this->monitor_count != 0, "Waiting with 0 monitors (%i)", this->monitor_count );
     280        assertf( this->monitors != NULL, "Waiting with no monitors (%p)", this->monitors );
     281        assertf( this->monitor_count != 0, "Waiting with 0 monitors (%i)", this->monitor_count );
    280282
    281283        unsigned short count = this->monitor_count;
     
    325327
    326328uintptr_t front( condition * this ) {
    327         verifyf( !is_empty(this),
    328                 "Attempt to access user data on an empty condition.\n"
    329                 "Possible cause is not checking if the condition is empty before reading stored data."
     329        LIB_DEBUG_DO(
     330                if( is_empty(this) ) {
     331                        abortf( "Attempt to access user data on an empty condition.\n"
     332                    "Possible cause is not checking if the condition is empty before reading stored data." );
     333                }
    330334        );
    331335        return this->blocked.head->user_info;
     
    487491
    488492void append( __condition_blocked_queue_t * this, __condition_node_t * c ) {
    489         verify(this->tail != NULL);
     493        assert(this->tail != NULL);
    490494        *this->tail = c;
    491495        this->tail = &c->next;
Note: See TracChangeset for help on using the changeset viewer.