2022-07-16 05:30:01 +03:00
|
|
|
Description: Don't use yield on CPUs that might not support it
|
|
|
|
|
2023-05-22 10:42:08 -03:00
|
|
|
---
|
|
|
|
src/corelib/global/qsimd_p.h | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
2022-07-16 20:37:43 +02:00
|
|
|
--- a/src/corelib/global/qsimd_p.h
|
|
|
|
+++ b/src/corelib/global/qsimd_p.h
|
2023-05-22 10:42:08 -03:00
|
|
|
@@ -401,7 +401,9 @@ static inline void qYieldCpu()
|
2022-07-16 05:30:01 +03:00
|
|
|
https://stackoverflow.com/a/70076751/134841
|
|
|
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105416
|
|
|
|
*/
|
|
|
|
+# if !defined(Q_CC_GNU) || (__ARM_ARCH >= 7)
|
|
|
|
asm volatile("yield"); /* this works everywhere */
|
|
|
|
+# endif
|
|
|
|
# else
|
|
|
|
__yield(); /* this is what should work everywhere */
|
|
|
|
# endif
|