ruby-changes:2876
From: ko1@a...
Date: 20 Dec 2007 19:14:39 +0900
Subject: [ruby-changes:2876] ko1 - Ruby:r14367 (trunk): * thread_pthread.c (native_thread_apply_priority): check
ko1 2007-12-20 19:14:16 +0900 (Thu, 20 Dec 2007) New Revision: 14367 Modified files: trunk/ChangeLog trunk/thread_pthread.c Log: * thread_pthread.c (native_thread_apply_priority): check _POSIX_PRIORITY_SCHEDULING for OpenBSD. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14367&r2=14366 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread_pthread.c?r1=14367&r2=14366 Index: ChangeLog =================================================================== --- ChangeLog (revision 14366) +++ ChangeLog (revision 14367) @@ -1,3 +1,8 @@ +Thu Dec 20 19:11:56 2007 Koichi Sasada <ko1@a...> + + * thread_pthread.c (native_thread_apply_priority): check + _POSIX_PRIORITY_SCHEDULING for OpenBSD. + Thu Dec 20 18:33:54 2007 Koichi Sasada <ko1@a...> * configure.in: add libthr for FreeBSD. Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 14366) +++ thread_pthread.c (revision 14367) @@ -334,6 +334,7 @@ static void native_thread_apply_priority(rb_thread_t *th) { +#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) struct sched_param sp; int policy; int priority = 0 - th->priority; @@ -351,6 +352,9 @@ sp.sched_priority = priority; pthread_setschedparam(th->thread_id, policy, &sp); +#else + /* not touched */ +#endif } static void -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml