From: Dmitry Adamushko Date: Tue, 18 Dec 2007 14:21:13 +0000 (+0100) Subject: sched: fix crash on ia64, introduce task_current() X-Git-Tag: v2.6.24-rc6~18^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=051a1d1afa47206e23ae03f781c6795ce870e3d5;p=pandora-kernel.git sched: fix crash on ia64, introduce task_current() Some services (e.g. sched_setscheduler(), rt_mutex_setprio() and sched_move_task()) must handle a given task differently in case it's the 'rq->curr' task on its run-queue. The task_running() interface is not suitable for determining such tasks for platforms with one of the following options: #define __ARCH_WANT_UNLOCKED_CTXSW #define __ARCH_WANT_INTERRUPTS_ON_CTXSW Due to the fact that it makes use of 'p->oncpu == 1' as a criterion but such a task is not necessarily 'rq->curr'. The detailed explanation is available here: https://lists.linux-foundation.org/pipermail/containers/2007-December/009262.html Signed-off-by: Dmitry Adamushko Signed-off-by: Ingo Molnar Tested-by: Dhaval Giani Tested-by: KAMEZAWA Hiroyuki --- Reading git-diff-tree failed