This commit is contained in:
liuqh
2024-05-10 15:42:42 +08:00
23 changed files with 221 additions and 778 deletions
@@ -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();
}