summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global/qglobal
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-07-06 10:57:35 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-07-25 07:21:56 -0700
commita7f227f56cfe562280e89d3c73040f7e8384129e (patch)
tree70fd65f8f5b0335fd8843d6eeebd0cbcef8f167a /tests/auto/corelib/global/qglobal
parentaaa8c3835303e6eb3579df300e06ea6696ca769f (diff)
Make qYieldCpu() public API
Rewritten to be a bit simpler, added a few more yield/YieldProcessor alternatives, added RISC-V support. [ChangeLog][QtCore] Added qYieldCpu() function. Fixes: QTBUG-103014 Change-Id: I53335f845a1345299031fffd176f59032e7400f5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/corelib/global/qglobal')
-rw-r--r--tests/auto/corelib/global/qglobal/qglobal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qglobal/qglobal.c b/tests/auto/corelib/global/qglobal/qglobal.c
index abe6ec4fde..8f9d8b5239 100644
--- a/tests/auto/corelib/global/qglobal/qglobal.c
+++ b/tests/auto/corelib/global/qglobal/qglobal.c
@@ -3,6 +3,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qtversion.h>
+#include <QtCore/qyieldcpu.h>
#ifdef Q_COMPILER_THREAD_LOCAL
# include <threads.h>
@@ -62,6 +63,12 @@ const char *tst_qVersion()
#endif
}
+void tst_qYieldCpu(void) Q_DECL_NOEXCEPT;
+void tst_qYieldCpu(void)
+{
+ qYieldCpu();
+}
+
/* Static assertion */
Q_STATIC_ASSERT(true);
Q_STATIC_ASSERT(1);