From: <ant...@us...> - 2008-10-03 18:44:35
|
Revision: 3430 http://oorexx.svn.sourceforge.net/oorexx/?rev=3430&view=rev Author: antiguru Date: 2008-10-03 18:44:22 +0000 (Fri, 03 Oct 2008) Log Message: ----------- Patch for OpenBSD missing thread priority functions. Modified Paths: -------------- main/trunk/common/platform/unix/SysThread.cpp Modified: main/trunk/common/platform/unix/SysThread.cpp =================================================================== --- main/trunk/common/platform/unix/SysThread.cpp 2008-10-03 18:31:24 UTC (rev 3429) +++ main/trunk/common/platform/unix/SysThread.cpp 2008-10-03 18:44:22 UTC (rev 3430) @@ -48,8 +48,8 @@ #include "SysThread.hpp" #include <stdio.h> +#include <unistd.h> - // attach an activity to an existing thread void SysThread::attachThread() { @@ -138,8 +138,10 @@ /* scheduling on two threads controlled by the result method of the */ /* message object do not work properly without an enhanced priority */ pthread_getschedparam(pthread_self(), &schedpolicy, &schedparam); +#ifdef _POSIX_PRIORITY_SCHEDULING maxpri = sched_get_priority_max(schedpolicy); minpri = sched_get_priority_min(schedpolicy); +#endif schedparam.sched_priority = (minpri + maxpri) / 2; #if defined(OPSYS_SUN) || defined(OPSYS_AIX43) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |