diff options
author | John Baldwin <jhb@FreeBSD.org> | 2018-11-05 21:34:17 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2018-11-05 21:34:17 +0000 |
commit | 4cbbb748880ba32a72944ff5ef8a51ec5cfab6b1 (patch) | |
tree | 7c7e79024804745c02472683ad32ad645c043ce0 /sys/arm/include | |
parent | b25c717954b929e80064b59d5e0d340731bf484d (diff) | |
download | src-4cbbb748880ba32a72944ff5ef8a51ec5cfab6b1.tar.gz src-4cbbb748880ba32a72944ff5ef8a51ec5cfab6b1.zip |
Add a KPI for the delay while spinning on a spin lock.
Replace a call to DELAY(1) with a new cpu_lock_delay() KPI. Currently
cpu_lock_delay() is defined to DELAY(1) on all platforms. However,
platforms with a DELAY() implementation that uses spin locks should
implement a custom cpu_lock_delay() doesn't use locks.
Reviewed by: kib
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=340164
Diffstat (limited to 'sys/arm/include')
-rw-r--r-- | sys/arm/include/cpu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/arm/include/cpu.h b/sys/arm/include/cpu.h index 1ef5798ecddb..7c7de38a2536 100644 --- a/sys/arm/include/cpu.h +++ b/sys/arm/include/cpu.h @@ -61,6 +61,7 @@ get_cyclecount(void) #define cpu_getstack(td) ((td)->td_frame->tf_usr_sp) #define cpu_setstack(td, sp) ((td)->td_frame->tf_usr_sp = (sp)) #define cpu_spinwait() /* nothing */ +#define cpu_lock_delay() DELAY(1) #define ARM_NVEC 8 #define ARM_VEC_ALL 0xffffffff |