1) Initialize mutex and timer
mutex_init(&test_lock);
timer_set(&timer, TIMER_PERIODIC, 5000, timer_handler, 0);
2) Try to lock mutex in timer handler
void timer_handler(...)
{
// Try to lock and immediately unlock
if (!mutex_trylock(&test_lock)) // <<<<<<< failing here
mutex_unlock(&test_lock);
}
Assert at src/kernel/thread/sync/mutex.c at 67 is triggered:
!critical_inside(__CRITICAL_HARDER(CRITICAL_SCHED_LOCK)
Original issue reported on code.google.com by vladisla...@gmail.com on 25 Apr 2013 at 2:30
Original issue reported on code.google.com by
vladisla...@gmail.com
on 25 Apr 2013 at 2:30