Question about dec_lock_cnt method in Context class
adam at os.inf.tu-dresden.de
Tue Sep 9 23:03:16 CEST 2014
On Mon Sep 08, 2014 at 11:54:32 -0400, Yuxin Ren wrote:
> Unfortunately this modification does not help.
> I have a question about the switch_lock code.
> PRIVATE inline
> bool NO_INSTRUMENT
> Switch_lock::set_lock_owner(Context *o)
> bool have_no_locks = o->_lock_cnt < 1;
> if (have_no_locks)
> assert_kdb (current_cpu() == o->home_cpu());
> for (;;)
> if (EXPECT_FALSE(access_once(&o->_running_under_lock)))
> if (EXPECT_TRUE(mp_cas(&o->_running_under_lock, Mword(false),
> In which case, the variable "_running_under_lock" is set to true but the
> lock_cnt is 0?
> Now in my test, the kernel goes into this dead loop.
Do you know when it was set to true? Maybe that would help finding out
why it is stuck there?
Adam adam at os.inf.tu-dresden.de
More information about the l4-hackers