* thread_pthread.c (native_thread_apply_priority): check
_POSIX_PRIORITY_SCHEDULING for OpenBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b28155a02f
commit
cb7e82a94a
@ -1,3 +1,8 @@
|
|||||||
|
Thu Dec 20 19:11:56 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* thread_pthread.c (native_thread_apply_priority): check
|
||||||
|
_POSIX_PRIORITY_SCHEDULING for OpenBSD.
|
||||||
|
|
||||||
Thu Dec 20 18:33:54 2007 Koichi Sasada <ko1@atdot.net>
|
Thu Dec 20 18:33:54 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* configure.in: add libthr for FreeBSD.
|
* configure.in: add libthr for FreeBSD.
|
||||||
|
@ -334,6 +334,7 @@ native_thread_join(pthread_t th)
|
|||||||
static void
|
static void
|
||||||
native_thread_apply_priority(rb_thread_t *th)
|
native_thread_apply_priority(rb_thread_t *th)
|
||||||
{
|
{
|
||||||
|
#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0)
|
||||||
struct sched_param sp;
|
struct sched_param sp;
|
||||||
int policy;
|
int policy;
|
||||||
int priority = 0 - th->priority;
|
int priority = 0 - th->priority;
|
||||||
@ -351,6 +352,9 @@ native_thread_apply_priority(rb_thread_t *th)
|
|||||||
|
|
||||||
sp.sched_priority = priority;
|
sp.sched_priority = priority;
|
||||||
pthread_setschedparam(th->thread_id, policy, &sp);
|
pthread_setschedparam(th->thread_id, policy, &sp);
|
||||||
|
#else
|
||||||
|
/* not touched */
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user