Merge branch 'smp' of https://gitlink.org.cn/tuyuyang/xiuos into smp
This commit is contained in:
@@ -37,6 +37,7 @@ Modification:
|
||||
|
||||
#include "assert.h"
|
||||
#include "pagetable.h"
|
||||
#include "spinlock.h"
|
||||
|
||||
#define KERN_BOOT_DRIVER(n, bi, f) \
|
||||
{ \
|
||||
|
||||
@@ -115,5 +115,5 @@ __attribute__((optimize("O0"))) bool spinlock_try_lock(struct spinlock* lock)
|
||||
|
||||
bool is_spinlock_hold_by_current_cpu(struct spinlock* lock)
|
||||
{
|
||||
return lock->owner_cpu;
|
||||
return lock->owner_cpu == cur_cpuid();
|
||||
}
|
||||
Reference in New Issue
Block a user