pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/libupnp Changes SetPolicyType() in threadutil:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5aff37fa5fa3
branches:  trunk
changeset: 555064:5aff37fa5fa3
user:      obache <obache%pkgsrc.org@localhost>
date:      Tue Feb 24 09:36:23 2009 +0000

description:
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:

 net/libupnp/Makefile         |   4 ++--
 net/libupnp/distinfo         |   4 ++--
 net/libupnp/patches/patch-aa |  23 +++++++++++++++++++----
 3 files changed, 23 insertions(+), 8 deletions(-)

diffs (77 lines):

diff -r 084e5ae0ef5a -r 5aff37fa5fa3 net/libupnp/Makefile
--- a/net/libupnp/Makefile      Tue Feb 24 07:54:02 2009 +0000
+++ b/net/libupnp/Makefile      Tue Feb 24 09:36:23 2009 +0000
@@ -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 -r 084e5ae0ef5a -r 5aff37fa5fa3 net/libupnp/distinfo
--- a/net/libupnp/distinfo      Tue Feb 24 07:54:02 2009 +0000
+++ b/net/libupnp/distinfo      Tue Feb 24 09:36:23 2009 +0000
@@ -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 -r 084e5ae0ef5a -r 5aff37fa5fa3 net/libupnp/patches/patch-aa
--- a/net/libupnp/patches/patch-aa      Tue Feb 24 07:54:02 2009 +0000
+++ b/net/libupnp/patches/patch-aa      Tue Feb 24 09:36:23 2009 +0000
@@ -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, &current );
-@@ -261,7 +261,7 @@ static int SetPolicyType( PolicyType in 
+-      current.sched_priority = DEFAULT_SCHED_PARAM;
+-      return sched_setscheduler( 0, in, &current );
++      current.sched_priority = sched_get_priority_min(in);
++      return sched_setscheduler( 0, in, &current ) == -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 @@
        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 );



Home | Main Index | Thread Index | Old Index