sched: fix locking when allocating an RTDS pCPU
as doing that include changing the scheduler lock
mapping for the pCPU itself, and the correct way
of doing that is:
- take the lock that the pCPU is using right now
(which may be the lock of another scheduler);
- change the mapping of the lock to the RTDS one;
- release the lock (the one that has actually been
taken!)
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>