From: Christoph Hellwig Date: Mon, 4 Jun 2007 13:26:51 +0000 (+1000) Subject: [POWERPC] spufs scheduler: Fix wakeup races X-Git-Tag: v2.6.22-rc5~102^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb5db29aa0379f0f3ef857a3a3715f17261c611b;p=pandora-kernel.git [POWERPC] spufs scheduler: Fix wakeup races Fix the race between checking for contexts on the runqueue and actually waking them in spu_deactive and spu_yield. The guts of spu_reschedule are split into a new helper called grab_runnable_context which shows if there is a runnable thread below a specified priority and if yes removes if from the runqueue and uses it. This function is used by the new __spu_deactivate hepler shared by preemption and spu_yield to grab a new context before deactivating a specified priority and if yes removes if from the runqueue and uses it. This function is used by the new __spu_deactivate hepler shared by preemption and spu_yield to grab a new context before deactivating the old one. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed