public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Parsons <lost.distance@yahoo.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Jiri Kosina <jkosina@suse.cz>, linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH] apm-emulation: Fix mutex race condition
Date: Tue, 3 May 2011 20:19:57 +0100 (BST)	[thread overview]
Message-ID: <729677.85794.qm@web29008.mail.ird.yahoo.com> (raw)
In-Reply-To: <201105032023.51728.rjw@sisk.pl>

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

  reply	other threads:[~2011-05-03 19:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03  0:16 [PATCH] apm-emulation: Fix mutex race condition Paul Parsons
2011-05-03 18:23 ` Rafael J. Wysocki
2011-05-03 19:19   ` Paul Parsons [this message]
2011-05-03 20:33     ` Rafael J. Wysocki
2011-05-04 11:44       ` Jiri Kosina
2011-05-04 16:43         ` Rafael J. Wysocki
2011-05-04 18:58           ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=729677.85794.qm@web29008.mail.ird.yahoo.com \
    --to=lost.distance@yahoo.com \
    --cc=jkosina@suse.cz \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox