scheduler: adjust internal locking interface
authorJan Beulich <jbeulich@suse.com>
Mon, 14 Oct 2013 06:57:56 +0000 (08:57 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 14 Oct 2013 06:57:56 +0000 (08:57 +0200)
commiteedd60391610629b4e8a2e8278b857ff884f750d
tree2074ed67f4e6eadf0c5ace2f94442411be7fdc67
parent48830988a28b7fb1eed225354e25572aa955749a
scheduler: adjust internal locking interface

Make the locking functions return the lock pointers, so they can be
passed to the unlocking functions (which in turn can check that the
lock is still actually providing the intended protection, i.e. the
parameters determining which lock is the right one didn't change).

Further use proper spin lock primitives rather than open coded
local_irq_...() constructs, so that interrupts can be re-enabled as
appropriate while spinning.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/common/sched_credit.c
xen/common/sched_credit2.c
xen/common/sched_sedf.c
xen/common/schedule.c
xen/include/xen/sched-if.h