spin_lock: inline spin_lock

test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
This commit is contained in:
hujun5
2024-07-03 15:10:49 +08:00
committed by Xiang Xiao
parent ae8ce535f3
commit a4fece3450
51 changed files with 358 additions and 596 deletions
+21
View File
@@ -1170,6 +1170,27 @@ void sched_note_spinlock(FAR struct tcb_s *tcb,
note_add(*driver, &note, sizeof(struct note_spinlock_s));
}
}
void sched_note_spinlock_lock(FAR volatile spinlock_t *spinlock)
{
sched_note_spinlock(this_task(), spinlock, NOTE_SPINLOCK_LOCK);
}
void sched_note_spinlock_locked(FAR volatile spinlock_t *spinlock)
{
sched_note_spinlock(this_task(), spinlock, NOTE_SPINLOCK_LOCKED);
}
void sched_note_spinlock_abort(FAR volatile spinlock_t *spinlock)
{
sched_note_spinlock(this_task(), spinlock, NOTE_SPINLOCK_ABORT);
}
void sched_note_spinlock_unlock(FAR volatile spinlock_t *spinlock)
{
sched_note_spinlock(this_task(), spinlock, NOTE_SPINLOCK_UNLOCK);
}
#endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_SYSCALL