clv: Change no_preempt from int to ihk_atomic_t.

Fix the issue where the value of no_preempt gets unexpected value
(-1, 1, 2 etc.) after process ends when running the UTI tests.

Change-Id: I7d9c08b754a171ea3fdec20ab2e635df3b607cbd
This commit is contained in:
Shiratori, Takehiro
2019-03-08 20:55:58 +09:00
committed by Masamichi Takagi
parent 1070387ed2
commit eba2131f34
5 changed files with 14 additions and 11 deletions

View File

@@ -3726,9 +3726,9 @@ void schedule(void)
int prevpid;
unsigned long irqstate = 0;
if (cpu_local_var(no_preempt)) {
if (ihk_atomic_read(&cpu_local_var(no_preempt))) {
kprintf("%s: WARNING can't schedule() while no preemption, cnt: %d\n",
__func__, cpu_local_var(no_preempt));
__func__, ihk_atomic_read(&cpu_local_var(no_preempt)));
irqstate = cpu_disable_interrupt_save();
ihk_mc_spinlock_lock_noirq(