summaryrefslogtreecommitdiff
path: root/lib/libthr/thread/thr_init.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2006-07-13 22:45:19 +0000
committerDavid Xu <davidxu@FreeBSD.org>2006-07-13 22:45:19 +0000
commite2dc286c1c5ae8ec8ef872d9a3c9e6f0d9cebe83 (patch)
tree38d9ff271ff8237cbfb86fa05d16da871f8e0dd2 /lib/libthr/thread/thr_init.c
parent86ed3c25e1c01f18591725b2996b882cde3d64bb (diff)
Notes
Diffstat (limited to 'lib/libthr/thread/thr_init.c')
-rw-r--r--lib/libthr/thread/thr_init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c
index 99bcea3df261..490c1b7dcaf5 100644
--- a/lib/libthr/thread/thr_init.c
+++ b/lib/libthr/thread/thr_init.c
@@ -362,6 +362,8 @@ _libpthread_init(struct pthread *curthread)
static void
init_main_thread(struct pthread *thread)
{
+ struct sched_param sched_param;
+
/* Setup the thread attributes. */
thr_self(&thread->tid);
thread->attr = _pthread_attr_default;
@@ -407,6 +409,10 @@ init_main_thread(struct pthread *thread)
thread->state = PS_RUNNING;
+ thr_getscheduler(thread->tid, &thread->attr.sched_policy,
+ &sched_param, sizeof(sched_param));
+ thread->attr.prio = sched_param.sched_priority;
+
/* Others cleared to zero by thr_alloc() */
}