
I will report this upstream if the bug is not on NetBSD, but I'm not sure. It seems that on NetBSD you aren't allowed to call pthread_attr_getschedparam() without first calling _setschedparam(). --HG-- extra : convert_revision : 6a2ed6884cd148e48af908be38e8bb1d0060ccab
17 lines
756 B
Diff
17 lines
756 B
Diff
xtraeme: calling pthread_attr_getschedparam() before _setschedparam() will
|
|
always return ENOMEM because at least on NetBSD, _setschedparam needs
|
|
to be called first.
|
|
|
|
--- gthread/gthread-posix.c.orig 2008-10-10 07:22:09.000000000 +0200
|
|
+++ gthread/gthread-posix.c 2008-10-10 07:22:29.000000000 +0200
|
|
@@ -343,9 +343,9 @@ g_thread_create_posix_impl (GThreadFunc
|
|
# ifdef G_THREADS_IMPL_POSIX
|
|
{
|
|
struct sched_param sched;
|
|
- posix_check_cmd (pthread_attr_getschedparam (&attr, &sched));
|
|
sched.sched_priority = g_thread_priority_map [priority];
|
|
posix_check_cmd_prio (pthread_attr_setschedparam (&attr, &sched));
|
|
+ posix_check_cmd (pthread_attr_getschedparam (&attr, &sched));
|
|
}
|
|
# else /* G_THREADS_IMPL_DCE */
|
|
posix_check_cmd_prio
|