Tejun Heo 1d927c3b5a apm-emulation: use wait_event_freezable() instead of freezer_[do_not_]count()
vfork is moving away from freezer_[do_not_]count() one way or the
other leaving apm_ioctl() as the only user.  apm_ioctl() just wants to
wait for suspend/resume cycle to complete without hindering the
freezer.  Use wait_event_freezable() instead.

The only annoyance is that wait_event_freezable() wakes up with
-ERESTART if there are pending signals while apm_ioctl() wants to
ignore all signals until suspend is complete.  We can play with
@current->[real_]blocked but this is hardly a performance or latency
critical path - simply chill a bit on each iteration until
SUSPEND_DONE for unlikely cases where there are pending signals.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-08-23 09:16:29 +02:00
..
2011-05-26 17:12:37 -07:00
2011-03-31 11:26:23 -03:00
2011-05-25 20:43:33 +02:00
2011-03-23 19:46:38 -07:00
2011-03-31 11:26:23 -03:00
2010-10-15 15:53:27 +02:00
2011-02-02 15:28:19 +01:00
2011-03-31 11:26:23 -03:00
2011-01-13 08:03:23 -08:00
2011-03-31 11:26:23 -03:00
2011-01-10 08:51:44 -08:00
2011-03-31 11:26:23 -03:00
2010-10-15 15:53:27 +02:00