diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-10-18 06:04:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 17:37:19 -0400 |
commit | e42837bcd35b75bb59ae5d3e62f87be1aeeb05c3 (patch) | |
tree | aa9666b080dc75ef3fa27992f042a422f7a979b7 /drivers/media | |
parent | 2e1318956ce6bf149af5c5e98499b5cd99f99c89 (diff) |
freezer: introduce freezer-friendly waiting macros
Introduce freezer-friendly wrappers around wait_event_interruptible() and
wait_event_interruptible_timeout(), originally defined in <linux/wait.h>, to
be used in freezable kernel threads. Make some of the freezable kernel
threads use them.
This is necessary for the freezer to stop sending signals to kernel threads,
which is implemented in the next patch.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index b203640ef1c5..445f02665577 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -527,7 +527,8 @@ static int dvb_frontend_thread(void *data) | |||
527 | up(&fepriv->sem); /* is locked when we enter the thread... */ | 527 | up(&fepriv->sem); /* is locked when we enter the thread... */ |
528 | restart: | 528 | restart: |
529 | timeout = wait_event_interruptible_timeout(fepriv->wait_queue, | 529 | timeout = wait_event_interruptible_timeout(fepriv->wait_queue, |
530 | dvb_frontend_should_wakeup(fe) || kthread_should_stop(), | 530 | dvb_frontend_should_wakeup(fe) || kthread_should_stop() |
531 | || freezing(current), | ||
531 | fepriv->delay); | 532 | fepriv->delay); |
532 | 533 | ||
533 | if (kthread_should_stop() || dvb_frontend_is_exiting(fe)) { | 534 | if (kthread_should_stop() || dvb_frontend_is_exiting(fe)) { |