Commit 89818c9c authored by Sam Thursfield's avatar Sam Thursfield

Merge branch 'sched_scheduler' into 'master'

tests: fix sched test under non glibc platforms

See merge request !275
parents 1df80d64 5258a8e7
Pipeline #220054 failed with stages
in 5 minutes and 55 seconds
......@@ -35,7 +35,13 @@ static gboolean
scheduler_is (gint scheduler)
{
#ifdef __linux__
return (sched_getscheduler (0) == scheduler);
int policy;
struct sched_param param;
if (pthread_getschedparam (pthread_self (), &policy, &param) != 0) {
g_assert_not_reached ();
}
return (policy == scheduler);
#else
return TRUE;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment