From: Uli Luckas <u.luckas@road.de>
To: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm] PM: Prevent frozen user mode helpers from failing the freezing of tasks (rev. 2)
Date: Tue, 26 Jun 2007 10:07:38 +0200 [thread overview]
Message-ID: <200706261007.38945.u.luckas@road.de> (raw)
In-Reply-To: <200706252352.24137.rjw@sisk.pl>
On Monday, 25. June 2007, Rafael J. Wysocki wrote:
> [I hope the ACKs still apply.]
>
Mine does
> +static void helper_lock(void)
> +{
> + atomic_inc(&running_helpers);
> + smp_mb__after_atomic_inc();
> +}
> +
> +static void helper_unlock(void)
> +{
> + if (atomic_dec_and_test(&running_helpers))
> + wake_up(&running_helpers_waitq);
> +}
> +
> +static void register_pm_notifier_callback(void)
> +{
> + pm_notifier(usermodehelper_pm_callback, 0);
> +}
> +#else /* CONFIG_PM */
> +static inline void helper_lock(void) {}
> +static inline void helper_unlock(void) {}
> +static inline void register_pm_notifier_callback(void) {}
>
Sorry for not realising this before, but I think, we should also inline the
actual implementations of helper_lock, helper_unlock and
register_pm_notifier_callback
Regards
Uli
--
------- ROAD ...the handyPC Company - - - ) ) )
Uli Luckas
Software Development
ROAD GmbH
Bennigsenstr. 14 | 12159 Berlin | Germany
fon: +49 (30) 230069 - 64 | fax: +49 (30) 230069 - 69
url: www.road.de
Amtsgericht Charlottenburg: HRB 96688 B
Managing directors: Hans-Peter Constien, Hubertus von Streit
prev parent reply other threads:[~2007-06-26 8:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-25 21:52 [PATCH -mm] PM: Prevent frozen user mode helpers from failing the freezing of tasks (rev. 2) Rafael J. Wysocki
2007-06-25 21:50 ` Nigel Cunningham
2007-06-25 21:55 ` Pavel Machek
2007-06-25 22:27 ` Rafael J. Wysocki
2007-06-26 8:48 ` Pavel Machek
2007-07-03 5:31 ` Benjamin Herrenschmidt
2007-06-26 12:02 ` Oleg Nesterov
2007-07-03 5:30 ` Benjamin Herrenschmidt
2007-07-03 13:19 ` Rafael J. Wysocki
2007-07-03 13:36 ` Rafael J. Wysocki
2007-07-03 17:45 ` Oleg Nesterov
2007-07-03 21:19 ` Benjamin Herrenschmidt
2007-06-26 8:07 ` Uli Luckas [this message]
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=200706261007.38945.u.luckas@road.de \
--to=u.luckas@road.de \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).