Use sched_yield instead of pthread_yield
sched_yield is standardized and on linux pthread_yield is implemented as sched_yield. Building Qt for Android on OS X doesn't compile with the pthread version. Change-Id: I1913afa83769805291e987f55b8f452299a43dce Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This commit is contained in:
parent
3109180881
commit
9922dafb23
@ -50,7 +50,7 @@
|
||||
#include "qdebug.h"
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
const QString qtest(qTableName("qtest", __FILE__, QSqlDatabase()));
|
||||
@ -159,7 +159,7 @@ public:
|
||||
q.bindValue(2, 10);
|
||||
QVERIFY_SQL(q, exec());
|
||||
#ifdef Q_OS_LINUX
|
||||
pthread_yield();
|
||||
sched_yield();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -197,7 +197,7 @@ public:
|
||||
q1.clear();
|
||||
QVERIFY_SQL(q2, exec());
|
||||
#ifdef Q_OS_LINUX
|
||||
pthread_yield();
|
||||
sched_yield();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user