tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: understanding LOCKDEBUG

> Does some LWP hold the lock or not?  How do I know?

If I read the code correctly, the only way to know the owner thread from a
given (waiting thread, syncobj) is to call (*l->l_syncobj->sobj_owner)().

        lwp_t *
        sobj_owner(lwp_t *l, void *sobj)

                return (*l->l_syncobj->sobj_owner)(sobj);

and in ddb, doing

        call sobj_owner(<lwp_address>, <lock_address>)

should return the address of the owner.

(Not tested at all. ;)


Home | Main Index | Thread Index | Old Index