diff options
author | obache <obache@pkgsrc.org> | 2009-02-24 09:36:23 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2009-02-24 09:36:23 +0000 |
commit | 037271e078336153409aadaf466a59af2426a52a (patch) | |
tree | 8cdb2ffad0279e397f4d56761a443907d43bb9bb /net | |
parent | 3787bfb859086ff1837fe8297050d50413fc7881 (diff) | |
download | pkgsrc-037271e078336153409aadaf466a59af2426a52a.tar.gz |
Changes SetPolicyType() in threadutil:
* From schedctl(8) of NetBSD-5-RC2, setting of priority for the process running
at SCHED_OTHER policy is not allowed, so change to skip if SCHED_OTHER is specified.
* Use sched_get_priority_min() instead of hard coded DEFAULT_SCHED_PARAM (= 0).
* Ajust return code as the "Returns:" section in this function's comment.
sched_setscheduler(3) return the previous policy if succeed, it may not be 0.
Bump PKGREVISION.
Diffstat (limited to 'net')
-rw-r--r-- | net/libupnp/Makefile | 4 | ||||
-rw-r--r-- | net/libupnp/distinfo | 4 | ||||
-rw-r--r-- | net/libupnp/patches/patch-aa | 23 |
3 files changed, 23 insertions, 8 deletions
diff --git a/net/libupnp/Makefile b/net/libupnp/Makefile index ec6a51ea5b4..fb2d6c1cf37 100644 --- a/net/libupnp/Makefile +++ b/net/libupnp/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.14 2008/05/15 13:42:29 obache Exp $ +# $NetBSD: Makefile,v 1.15 2009/02/24 09:36:23 obache Exp $ # DISTNAME= libupnp-1.6.6 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pupnp/} EXTRACT_SUFX= .tar.bz2 diff --git a/net/libupnp/distinfo b/net/libupnp/distinfo index 9b97269c8ad..575f17630c5 100644 --- a/net/libupnp/distinfo +++ b/net/libupnp/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.14 2008/05/15 13:42:29 obache Exp $ +$NetBSD: distinfo,v 1.15 2009/02/24 09:36:23 obache Exp $ SHA1 (libupnp-1.6.6.tar.bz2) = 24c2c349cb52ed3d62121fbdae205c8d9dc0f5fa RMD160 (libupnp-1.6.6.tar.bz2) = 25ff0390793cfa48cca32a335b4d633283b1fe64 Size (libupnp-1.6.6.tar.bz2) = 1146854 bytes -SHA1 (patch-aa) = 66473171bdabd6396766a328f448f5ce21835093 +SHA1 (patch-aa) = cfdbe2bfdac1aab7f6f74534429ceec70f1ceac3 SHA1 (patch-ab) = cfdedfc192854389d77ee79d875b618a204770f9 SHA1 (patch-ac) = 05ba4584d2ebdb2de041e67f4c8d1c05e4fc1970 SHA1 (patch-ae) = 7331c61d5b3a47ca3865788cf88a973d5e9352a1 diff --git a/net/libupnp/patches/patch-aa b/net/libupnp/patches/patch-aa index 22b3b11709d..665dd455862 100644 --- a/net/libupnp/patches/patch-aa +++ b/net/libupnp/patches/patch-aa @@ -1,17 +1,32 @@ -$NetBSD: patch-aa,v 1.9 2008/05/13 11:20:02 obache Exp $ +$NetBSD: patch-aa,v 1.10 2009/02/24 09:36:23 obache Exp $ --- threadutil/src/ThreadPool.c.orig 2008-04-10 16:03:04.000000000 +0000 +++ threadutil/src/ThreadPool.c -@@ -234,7 +234,7 @@ static int SetPolicyType( PolicyType in +@@ -234,12 +234,20 @@ static int SetPolicyType( PolicyType in return 0; #elif defined(WIN32) return sched_setscheduler( 0, in ); -#elif defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING > 0 +#elif defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING >= 200112L ++#if defined(__NetBSD__) ++ if (in != SCHED_OTHER) { ++#endif struct sched_param current; sched_getparam( 0, ¤t ); -@@ -261,7 +261,7 @@ static int SetPolicyType( PolicyType in +- current.sched_priority = DEFAULT_SCHED_PARAM; +- return sched_setscheduler( 0, in, ¤t ); ++ current.sched_priority = sched_get_priority_min(in); ++ return sched_setscheduler( 0, in, ¤t ) == -1 ? -1 : 0; ++#if defined(__NetBSD__) ++ } else { ++ return 0; ++ } ++#endif + #else + return 0; + #endif +@@ -261,7 +269,7 @@ static int SetPolicyType( PolicyType in *****************************************************************************/ static int SetPriority( ThreadPriority priority ) { @@ -20,7 +35,7 @@ $NetBSD: patch-aa,v 1.9 2008/05/13 11:20:02 obache Exp $ int currentPolicy; int minPriority = 0; int maxPriority = 0; -@@ -389,7 +389,7 @@ static void SetSeed() +@@ -389,7 +397,7 @@ static void SetSeed() gettimeofday(&t, NULL); #if defined(WIN32) srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id().p ); |