diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-03-05 07:01:20 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-03-05 07:01:20 +0000 |
commit | d6c532fa793acc86939e2f314b7e07253c4d2f66 (patch) | |
tree | 10ecc11140b755482d1cf06ddf32102e5c7b151b /lib/libthr/thread/thr_init.c | |
parent | b118d117f407ad716a2ee483431aa05e90f8f7ce (diff) | |
download | FreeBSD-src-d6c532fa793acc86939e2f314b7e07253c4d2f66.zip FreeBSD-src-d6c532fa793acc86939e2f314b7e07253c4d2f66.tar.gz |
Use cpuset defined in pthread_attr for newly created thread, for now,
we set scheduling parameters and cpu binding fully in userland, and
because default scheduling policy is SCHED_RR (time-sharing), we set
default sched_inherit to PTHREAD_SCHED_INHERIT, this saves a system
call.
Diffstat (limited to 'lib/libthr/thread/thr_init.c')
-rw-r--r-- | lib/libthr/thread/thr_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index d76c5ca..100d14a 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -75,7 +75,7 @@ struct pthread_prio _thr_priorities[3] = { struct pthread_attr _pthread_attr_default = { .sched_policy = SCHED_OTHER, - .sched_inherit = 0, + .sched_inherit = PTHREAD_INHERIT_SCHED, .prio = 0, .suspend = THR_CREATE_RUNNING, .flags = PTHREAD_SCOPE_SYSTEM, |