pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/kiax Fix error code handling for thread priority s...
details: https://anonhg.NetBSD.org/pkgsrc/rev/512565d49193
branches: trunk
changeset: 507041:512565d49193
user: reinoud <reinoud%pkgsrc.org@localhost>
date: Wed Jan 25 15:04:30 2006 +0000
description:
Fix error code handling for thread priority setting on non NetBSD systems.
Forgot to remove the changes.
diffstat:
net/kiax/distinfo | 6 +++---
net/kiax/patches/patch-ag | 11 ++++-------
net/kiax/patches/patch-ah | 13 ++++---------
3 files changed, 11 insertions(+), 19 deletions(-)
diffs (98 lines):
diff -r b98f6ad5ee0b -r 512565d49193 net/kiax/distinfo
--- a/net/kiax/distinfo Wed Jan 25 14:41:31 2006 +0000
+++ b/net/kiax/distinfo Wed Jan 25 15:04:30 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1.1.1 2006/01/25 00:00:03 reinoud Exp $
+$NetBSD: distinfo,v 1.2 2006/01/25 15:04:30 reinoud Exp $
SHA1 (kiax-0.8.4.tar.bz2) = 8889ad5051b24e4508db404b73431b5f3fcef88f
RMD160 (kiax-0.8.4.tar.bz2) = 90d214096d447118e9e9bd312ed8745fccef0164
@@ -9,6 +9,6 @@
SHA1 (patch-ad) = f17a1dfb2f163dac5e40d869a5d8e9b01d39d0f5
SHA1 (patch-ae) = 6b74195590491a8dbdf6a69258377ae3132cae96
SHA1 (patch-af) = b2492a4aff367ec1330948bb4c7dc093152da59c
-SHA1 (patch-ag) = 07ff66762038b7a8049aa48c4df35387effe86e6
-SHA1 (patch-ah) = 09e7fe192d0e9d495f42ec6149601df3e3ea893d
+SHA1 (patch-ag) = 70bc22a9750f20385a4653a39e16fddf1a88a700
+SHA1 (patch-ah) = c7a2b3464f840f43df787ff7fc4a7f9d0ce44e18
SHA1 (patch-ai) = be877fd098ac4a8218261d98c9a5498e44d6fb10
diff -r b98f6ad5ee0b -r 512565d49193 net/kiax/patches/patch-ag
--- a/net/kiax/patches/patch-ag Wed Jan 25 14:41:31 2006 +0000
+++ b/net/kiax/patches/patch-ag Wed Jan 25 15:04:30 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ag,v 1.1.1.1 2006/01/25 00:00:03 reinoud Exp $
+$NetBSD: patch-ag,v 1.2 2006/01/25 15:04:30 reinoud Exp $
--- lib/portaudio/pa_unix_oss/pa_unix.c.orig 2005-04-05 23:53:41.000000000 +0200
+++ lib/portaudio/pa_unix_oss/pa_unix.c
@@ -6,9 +6,8 @@
maxPri = sched_get_priority_max(SCHEDULER_POLICY);
if( schp.sched_priority > maxPri ) schp.sched_priority = maxPri;
-- if (sched_setscheduler(0, SCHEDULER_POLICY, &schp) != 0)
+#ifndef __NetBSD__
-+ if (sched_setscheduler(0, SCHEDULER_POLICY, &schp) != ENOSYS)
+ if (sched_setscheduler(0, SCHEDULER_POLICY, &schp) != 0)
{
ERR_RPT(("PaHost_WatchDogProc: cannot set watch dog priority!\n"));
goto killAudio;
@@ -17,16 +16,14 @@
/* Compare watchdog time with audio and canary thread times. */
/* Sleep for a while or until thread cancelled. */
-@@ -465,7 +467,8 @@ static PaError PaHost_WatchDogProc( PaHo
+@@ -465,6 +467,7 @@ static PaError PaHost_WatchDogProc( PaHo
lowerAudio:
{
struct sched_param schat = { 0 };
-- if( sched_setscheduler(pahsc->pahsc_AudioThreadPID, SCHED_OTHER, &schat) != 0)
+#ifndef __NetBSD__
-+ if( sched_setscheduler(pahsc->pahsc_AudioThreadPID, SCHED_OTHER, &schat) != ENOSYS)
+ if( sched_setscheduler(pahsc->pahsc_AudioThreadPID, SCHED_OTHER, &schat) != 0)
{
ERR_RPT(("PaHost_WatchDogProc: failed to lower audio priority. errno = %d\n", errno ));
- /* Fall through into killing audio thread. */
@@ -475,6 +478,9 @@ lowerAudio:
ERR_RPT(("PaHost_WatchDogProc: lowered audio priority to prevent hogging of CPU.\n"));
goto cleanup;
diff -r b98f6ad5ee0b -r 512565d49193 net/kiax/patches/patch-ah
--- a/net/kiax/patches/patch-ah Wed Jan 25 14:41:31 2006 +0000
+++ b/net/kiax/patches/patch-ah Wed Jan 25 15:04:30 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ah,v 1.1.1.1 2006/01/25 00:00:03 reinoud Exp $
+$NetBSD: patch-ah,v 1.2 2006/01/25 15:04:30 reinoud Exp $
--- lib/unixfuncs.c.orig 2005-04-05 23:53:41.000000000 +0200
+++ lib/unixfuncs.c
@@ -23,9 +23,8 @@
maxPri = sched_get_priority_max(SCHEDULER_POLICY);
if( schp.sched_priority > maxPri ) schp.sched_priority = maxPri;
-- if (pthread_setschedparam(pthread_self(), SCHEDULER_POLICY, &schp) != 0)
+#ifndef __NetBSD__
-+ if (pthread_setschedparam(pthread_self(), SCHEDULER_POLICY, &schp) != ENOSYS)
+ if (pthread_setschedparam(pthread_self(), SCHEDULER_POLICY, &schp) != 0)
{
ERR_RPT("WatchDogProc: cannot set watch dog priority!\n");
goto killAudio;
@@ -34,18 +33,14 @@
DBUG("prioboost: WatchDog priority set to level %d!\n", schp.sched_priority);
-@@ -237,9 +249,10 @@ static int WatchDogProc( prioboost *b
+@@ -237,6 +249,7 @@ static int WatchDogProc( prioboost *b
return 0;
lowerAudio:
+#ifndef __NetBSD__
{
struct sched_param schat = { 0 };
-- if( pthread_setschedparam(b->ThreadID, SCHED_OTHER, &schat) != 0)
-+ if( pthread_setschedparam(b->ThreadID, SCHED_OTHER, &schat) != ENOSYS)
- {
- ERR_RPT("WatchDogProc: failed to lower audio priority. errno = %d\n", errno );
- /* Fall through into killing audio thread. */
+ if( pthread_setschedparam(b->ThreadID, SCHED_OTHER, &schat) != 0)
@@ -250,6 +263,9 @@ lowerAudio:
goto cleanup;
}
Home |
Main Index |
Thread Index |
Old Index