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:
committed by
Masamichi Takagi
parent
1070387ed2
commit
eba2131f34
@@ -107,7 +107,7 @@ struct cpu_local_var {
|
||||
struct list_head migq;
|
||||
int in_interrupt;
|
||||
int in_page_fault;
|
||||
int no_preempt;
|
||||
ihk_atomic_t no_preempt;
|
||||
int timer_enabled;
|
||||
unsigned long nr_ctx_switches;
|
||||
int kmalloc_initialized;
|
||||
|
||||
@@ -19,8 +19,10 @@
|
||||
|
||||
#define kmalloc(size, flag) ({\
|
||||
void *r = _kmalloc(size, flag, __FILE__, __LINE__);\
|
||||
if(r == NULL){\
|
||||
kprintf("kmalloc: out of memory %s:%d no_preempt=%d\n", __FILE__, __LINE__, cpu_local_var(no_preempt)); \
|
||||
if (r == NULL) {\
|
||||
kprintf("kmalloc: out of memory %s:%d no_preempt=%d\n", \
|
||||
__FILE__, __LINE__, \
|
||||
ihk_atomic_read(&cpu_local_var(no_preempt))); \
|
||||
}\
|
||||
r;\
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user