[PATCH] preempt abstraction

David Howells (dhowells@redhat.com)
Tue, 08 Jan 2002 17:40:19 +0000


The following patch abstracts access to need_resched:

ftp://infradead.org/pub/people/dwh/preempt-252p10.diff.bz2

It replaces most C-source read accesses to it with need_preempt() which
returns true if rescheduling is necessary.

It also replaces instances of:

if (current->need_resched())
schedule();

With:

preempt();

It doesn't (or at least shouldn't) do anything else.

Cheers,
David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/