mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-21 10:26:35 +00:00
bugfix: 修复多核启动时,自旋锁持有计数错误的问题
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
#define preempt_disable() \
|
||||
do \
|
||||
{ \
|
||||
--(current_pcb->preempt_count);\
|
||||
++(current_pcb->preempt_count);\
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
@ -19,5 +19,5 @@ do \
|
||||
#define preempt_enable() \
|
||||
do \
|
||||
{ \
|
||||
++(current_pcb->preempt_count);\
|
||||
--(current_pcb->preempt_count);\
|
||||
}while(0)
|
||||
|
@ -152,15 +152,15 @@ union proc_union
|
||||
{ \
|
||||
.state = PROC_UNINTERRUPTIBLE, \
|
||||
.flags = PF_KTHREAD, \
|
||||
.preempt_count = 0, \
|
||||
.signal = 0, \
|
||||
.cpu_id = 0, \
|
||||
.mm = &initial_mm, \
|
||||
.thread = &initial_thread, \
|
||||
.addr_limit = 0xffffffffffffffff, \
|
||||
.pid = 0, \
|
||||
.virtual_runtime = 0, \
|
||||
.signal = 0, \
|
||||
.priority = 2, \
|
||||
.preempt_count = 0, \
|
||||
.cpu_id = 0, \
|
||||
.virtual_runtime = 0, \
|
||||
.fds = {0}, \
|
||||
.next_pcb = &proc, \
|
||||
.parent_pcb = &proc, \
|
||||
|
Reference in New Issue
Block a user