[PATCH] get/put_cpu methods
authorRobert Love <rml@tech9.net>
Tue, 21 May 2002 10:21:43 +0000 (03:21 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 21 May 2002 10:21:43 +0000 (03:21 -0700)
commit79eb6a126211dc1cbb20f16f67bad69afa2f9703
treebd59645d6b1a5e0a069a52f2d12fb77411da27f2
parent8e93dcc872459a0601273631848ccc3f319af02f
[PATCH] get/put_cpu methods

This implements a get_cpu() and matching put_cpu() to safely hand out
the current CPU to avoid preempt races.  Andrew and I have been bitching
about the need for such a method.

I also went ahead and replaced an example of current explicit
preempt-off with the new methods, as a case in point.
Documentation/preempt-locking.txt
include/linux/smp.h
mm/page-writeback.c