Re: [PATCH] apm-emulation: Fix mutex race condition

Paul Parsons
2011-05-03T19:19:57Z

Hi Rafael,

--- On Tue, 3/5/11, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> Hmm.  I'd rather use mutex_trylock() and call try_to_freeze() if
> that fails.
>
> Is there anything wrong with this approach?

Well, mutex_trylock() doesn't wait if it cannot acquire the mutex, so won't the calling process enter a busy loop if it fails?

Regards,
Paul