Deleted Added
full compact
33c33
< * $FreeBSD: head/lib/libkse/thread/thr_create.c 118514 2003-08-06 00:23:40Z marcel $
---
> * $FreeBSD: head/lib/libkse/thread/thr_create.c 120074 2003-09-14 22:52:16Z davidxu $
102d101
< int i;
130c129
< else
---
> else {
131a131,142
> if ((*attr)->sched_inherit == PTHREAD_INHERIT_SCHED) {
> /* inherit scheduling contention scop */
> if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM)
> new_thread->attr.flags |= PTHREAD_SCOPE_SYSTEM;
> else
> new_thread->attr.flags &= ~PTHREAD_SCOPE_SYSTEM;
> /*
> * scheduling policy and scheduling parameters will be
> * inherited in following code.
> */
> }
> }
202c213
< if ((new_thread->attr.flags & PTHREAD_INHERIT_SCHED) != 0) {
---
> if (new_thread->attr.sched_inherit == PTHREAD_INHERIT_SCHED) {
233,247d243
< /*
< * Initialize thread locking.
< * Lock initializing needs malloc, so don't
< * enter critical region before doing this!
< */
< if (_lock_init(&new_thread->lock, LCK_ADAPTIVE,
< _thr_lock_wait, _thr_lock_wakeup) != 0)
< PANIC("Cannot initialize thread lock");
< for (i = 0; i < MAX_THR_LOCKLEVEL; i++) {
< _lockuser_init(&new_thread->lockusers[i],
< (void *)new_thread);
< _LCK_SET_PRIVATE2(&new_thread->lockusers[i],
< (void *)new_thread);
< }
<
249a246
> new_thread->specific_data_count = 0;
252a250,254
> new_thread->wakeup_time.tv_sec = -1;
> new_thread->lock_switch = 0;
> sigemptyset(&new_thread->sigpend);
> new_thread->check_pending = 0;
> new_thread->locklevel = 0;