Re: Lockdep question regarding two-level locks
From: Michel Lespinasse
Date: Sat Aug 22 2020 - 13:30:53 EST
On Sat, Aug 22, 2020 at 9:04 AM Michel Lespinasse <walken@xxxxxxxxxx> wrote:
> - B's implementation could, when lockdep is enabled, always release
> lock A before acquiring lock B. This is not ideal though, since this
> would hinder testing of the not-blocked code path in the acquire
> sequence.
Actually, this may be an acceptable way to handle my issue. In the
non-blocking case, B's implementation does not have to actually
release A, but it could tell lockdep that it's released A, acquired B
and acquired A again. Kinda ugly but should work...
--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.