Ignore:
File:
1 edited

Legend:

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

    rd0a045c7 r2e9aed4  
    8787                thread_desc * thrd = this_thread;
    8888
     89                verify( disable_preempt_count > 0 );
     90
    8991                __cfaabi_dbg_print_safe("Kernel : %10p Entering mon %p (%p)\n", thrd, this, this->owner);
    9092
     
    115117                        // Some one else has the monitor, wait in line for it
    116118                        append( this->entry_queue, thrd );
     119
     120                        verify( disable_preempt_count > 0 );
    117121
    118122                        BlockInternal( &this->lock );
     
    392396        append( this.blocked, &waiter );
    393397
     398        verify( disable_preempt_count == 0 );
     399
    394400        // Lock all monitors (aggregates the locks as well)
    395401        lock_all( monitors, locks, count );
     402
     403        // verifyf( disable_preempt_count == count, "Got %d, expected %d\n", disable_preempt_count, count );
     404        if(disable_preempt_count != count) { __cfaabi_dbg_print_buffer_decl("----------Gonna crash\n"); }
    396405
    397406        // Find the next thread(s) to run
     
    468477        monitor_ctx( this.monitors, this.monitor_count );
    469478
     479        verify( disable_preempt_count == 0 );
     480
    470481        // Lock all monitors (aggregates the locks them as well)
    471482        lock_all( monitors, locks, count );
     483
     484        // verify( disable_preempt_count == count );
     485        if(disable_preempt_count != count) { __cfaabi_dbg_print_buffer_decl("----------Gonna crash\n"); }
    472486
    473487
Note: See TracChangeset for help on using the changeset viewer.