vppinfra: implement CLIB_PAUSE () for aarch64 platforms
Define CLIB_PAUSE () to generate the "yield" instruction. No significant
performance changes were observed for clib_spinlock_t and clib_rwlock_t.
Type: feature
Change-Id: I59eb996e61c7a16007517e57e6996567302c1657
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
(cherry picked from commit 18512b002d)
This commit is contained in:
committed by
Andrew Yourtchenko
parent
3642782a27
commit
a3c45242b1
@@ -21,6 +21,8 @@
|
||||
|
||||
#if __x86_64__
|
||||
#define CLIB_PAUSE() __builtin_ia32_pause ()
|
||||
#elif defined (__aarch64__) || defined (__arm__)
|
||||
#define CLIB_PAUSE() __asm__ ("yield")
|
||||
#else
|
||||
#define CLIB_PAUSE()
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user