[linux-pm] windfarm got signal
Nigel Cunningham
ncunningham at linuxmail.org
Thu Jun 22 22:33:26 EST 2006
Hi.
On Thursday 22 June 2006 21:34, Johannes Berg wrote:
> On Thu, 2006-06-22 at 13:13 +0200, Johannes Berg wrote:
> > Thanks, I'll look and submit a patch. It does try_to_freeze() but also
> > checks for pending signals.
>
> Ah. The code is just in the wrong order:
> while (!kthread_should_stop()) {
> try_to_freeze();
> ...
> schedule_timeout_interruptible(...);
> if (signal_pending())
> break;
> }
>
> Would it be correct to just move the try_to_freeze() before the
> signal_pending() statement?
Hmm. Will kthread_should_stop() be set if it should really exit? If so,
perhaps you can just remove the signal_pending() check. Otherwise, you'd want
to change the signal_pending() test to something like the "if
(signal_pending() && !try_to_freeze())" to avoid any possibility of a race.
(In this case, you should be able to remove the try_to_freeze() from above).
Regards,
Nigel
--
Nigel, Michelle and Alisdair Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060622/9f7bb90e/attachment.pgp>
More information about the Linuxppc-dev
mailing list