|
|
@ -55,6 +55,8 @@ DECLARE_CV_PAUSE |
|
|
|
# define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("yield" ::: "memory"); } } while (0) |
|
|
|
# define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("yield" ::: "memory"); } } while (0) |
|
|
|
# elif defined __GNUC__ && defined __arm__ |
|
|
|
# elif defined __GNUC__ && defined __arm__ |
|
|
|
# define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("" ::: "memory"); } } while (0) |
|
|
|
# define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("" ::: "memory"); } } while (0) |
|
|
|
|
|
|
|
# elif defined __GNUC__ && defined __PPC64__ |
|
|
|
|
|
|
|
# define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("or 27,27,27" ::: "memory"); } } while (0) |
|
|
|
# else |
|
|
|
# else |
|
|
|
# warning "Can't detect 'pause' (CPU-yield) instruction on the target platform. Specify CV_PAUSE() definition via compiler flags." |
|
|
|
# warning "Can't detect 'pause' (CPU-yield) instruction on the target platform. Specify CV_PAUSE() definition via compiler flags." |
|
|
|
# define CV_PAUSE(...) do { /* no-op: works, but not effective */ } while (0) |
|
|
|
# define CV_PAUSE(...) do { /* no-op: works, but not effective */ } while (0) |
|
|
|