a540a8b3b4
A lightweight cross platform IP telephony client using the IAX protocol, designed for use with the asterisk open source PBX. OK, landry@ jasper@
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
$OpenBSD: patch-lib_unixfuncs_c,v 1.1 2010/06/18 17:32:21 sebastia Exp $
|
|
we do not have sched_get_priority_{min/max}, fix was inspired by patch to pjsua
|
|
to fix the same problem.
|
|
--- lib/unixfuncs.c.orig Sun Nov 15 10:43:40 2009
|
|
+++ lib/unixfuncs.c Sun Nov 15 10:44:46 2009
|
|
@@ -217,7 +217,8 @@ static int WatchDogProc( prioboost *b )
|
|
/* Run at a priority level above main thread so we can still run if it hangs. */
|
|
/* Rise more than 1 because of rumored off-by-one scheduler bugs. */
|
|
schp.sched_priority = b->priority + 4;
|
|
- maxPri = sched_get_priority_max(SCHEDULER_POLICY);
|
|
+// maxPri = sched_get_priority_max(SCHEDULER_POLICY);
|
|
+ maxPri=0;
|
|
if( schp.sched_priority > maxPri ) schp.sched_priority = maxPri;
|
|
|
|
if (pthread_setschedparam(pthread_self(), SCHEDULER_POLICY, &schp) != 0)
|
|
@@ -368,8 +369,9 @@ int iaxci_prioboostbegin()
|
|
|
|
int result = 0;
|
|
|
|
- b->priority = (sched_get_priority_max(SCHEDULER_POLICY) -
|
|
- sched_get_priority_min(SCHEDULER_POLICY)) / 2;
|
|
+// b->priority = (sched_get_priority_max(SCHEDULER_POLICY) -
|
|
+// sched_get_priority_min(SCHEDULER_POLICY)) / 2;
|
|
+ b->priority = 0;
|
|
schp.sched_priority = b->priority;
|
|
|
|
b->ThreadID = pthread_self();
|