mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
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:
@@ -1170,6 +1170,27 @@ void sched_note_spinlock(FAR struct tcb_s *tcb,
|
||||
note_add(*driver, ¬e, 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
|
||||
|
||||
Reference in New Issue
Block a user