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/amd64/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/amd64/include')
-rw-r--r-- | sys/amd64/include/cpu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index db3554fad84f..fa5c1c9002d0 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -50,6 +50,7 @@ #define cpu_getstack(td) ((td)->td_frame->tf_rsp) #define cpu_setstack(td, ap) ((td)->td_frame->tf_rsp = (ap)) #define cpu_spinwait() ia32_pause() +#define cpu_lock_delay() DELAY(1) #define TRAPF_USERMODE(framep) \ (ISPL((framep)->tf_cs) == SEL_UPL) |