openbsd-ports/devel/fox/patches/patch-src_FXThread_cpp
espie 4279f88857 new versions.
Build system of goggles entirely changed. Totally funky, but still
more fun than autoconf junk !
2005-05-07 11:53:03 +00:00

21 lines
731 B
Plaintext

$OpenBSD: patch-src_FXThread_cpp,v 1.1 2005/05/07 11:53:03 espie Exp $
--- src/FXThread.cpp.orig Sat May 7 12:36:23 2005
+++ src/FXThread.cpp Sat May 7 12:42:00 2005
@@ -353,10 +353,16 @@ void FXThread::priority(FXint prio){
sched_param sched={0};
int priomin,priomax;
if(tid){
+#if defined(SCHED_OTHER)
+# if defined(_POSIX_PRIORITY_SCHEDULING)
priomax=sched_get_priority_max(SCHED_OTHER);
priomin=sched_get_priority_min(SCHED_OTHER);
sched.sched_priority=FXCLAMP(priomin,prio,priomax);
+# elif defined(PTHREAD_MINPRIORITY)
+ sched.sched_priority=FXCLAMP(PTHREAD_MIN_PRIORITY,prio,PTHREAD_MAX_PRIORITY);
+# endif
pthread_setschedparam((pthread_t)tid,SCHED_OTHER,&sched);
+#endif
}
}