diff options
Diffstat (limited to 'lib/libthr/thread/thr_init.c')
-rw-r--r-- | lib/libthr/thread/thr_init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 99bcea3..490c1b7 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() */ } |