[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45D303F5.20209@yahoo.fr>
Date: Wed, 14 Feb 2007 13:43:33 +0100
From: Guillaume Chazarain <guichaz@...oo.fr>
To: Ingo Molnar <mingo@...e.hu>
CC: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Arjan van de Ven <arjan@...radead.org>,
Christoph Hellwig <hch@...radead.org>,
Andrew Morton <akpm@....com.au>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Ulrich Drepper <drepper@...hat.com>,
Zach Brown <zach.brown@...cle.com>,
Evgeniy Polyakov <johnpol@....mipt.ru>,
"David S. Miller" <davem@...emloft.net>,
Benjamin LaHaise <bcrl@...ck.org>,
Suparna Bhattacharya <suparna@...ibm.com>,
Davide Libenzi <davidel@...ilserver.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [patch 05/11] syslets: core code
Ingo Molnar a écrit :
> + if (unlikely(signal_pending(t) || need_resched()))
> + goto stop;
>
So, this is how you'll prevent me from running an infinite loop ;-)
The attached patch adds a cond_resched() instead, to allow infinite
loops without DoS. I dropped the unlikely() as it's already in the
definition of signal_pending().
> +asmlinkage long sys_async_wait(unsigned long min_wait_events)
>
Here I would expect:
sys_async_wait_for_all(struct syslet_atom *atoms, long nr_atoms)
and
sys_async_wait_for_any(struct syslet_atom *atoms, long nr_atoms).
This way syslets can be used by different parts of a program without
having them waiting for each other.
Thanks.
--
Guillaume
View attachment "cond_resched.diff" of type "text/x-patch" (322 bytes)
Powered by blists - more mailing lists