no pthread_yield() on netbsd
Bug #287090 reported by
jym
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBXT |
Fix Released
|
Undecided
|
Paul McCullagh |
Bug Description
pthread_yield() function doesn't exist on netbsd. Use sched_yield() instead.
With this modification, compilation is OK on Netbsd. MacosX seems to have the same problem (but I did not try to compile pbxt on it).
jym
Related branches
Changed in pbxt: | |
assignee: | nobody → paul-mccullagh |
status: | New → Incomplete |
To post a comment you must log in.
Hi JYM,
Thanks for the bug report! Please check if the following code solves the problem:
xtPublic void xt_yield(void)
{
#ifdef XT_WIN
Sleep(0);
#elif defined(XT_MAC)
usleep(0);
#else
#if defined(__NetBSD__)
sched_yield();
#else
pthread_yield();
#endif
#endif
}