PERFORCE change 67977 for review
David Xu
davidxu at FreeBSD.org
Fri Dec 31 06:56:04 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=67977
Change 67977 by davidxu at davidxu_tiger on 2004/12/31 14:55:50
some fields no longer exist.
Affected files ...
.. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_create.c#3 edit
Differences ...
==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_create.c#3 (text+ko) ====
@@ -113,10 +113,8 @@
_thr_free(curthread, new_thread);
} else {
new_thread->tid = 0;
+ new_thread->cycle = 0;
new_thread->isdead = 0;
- new_thread->sigseqno = 0;
- new_thread->lock_switch = 0;
- new_thread->idle = 0;
new_thread->rtld_bits = 0;
/*
* Write a magic value to the thread structure
@@ -183,9 +181,6 @@
new_thread->flags = 0;
new_thread->tlflags = 0;
new_thread->sigbackout = NULL;
- new_thread->continuation = NULL;
- new_thread->wakeup_time.tv_sec = -1;
- new_thread->timeout = 0;
new_thread->error = 0;
SIGEMPTYSET(new_thread->sigpend);
new_thread->check_pending = 0;
@@ -193,15 +188,11 @@
new_thread->locklevel = 0;
new_thread->rdlock_count = 0;
new_thread->data.mutex = 0;
- new_thread->interrupted = 0;
new_thread->priority_mutex_count = 0;
new_thread->rtld_bits = 0;
- if (new_thread->attr.suspend == THR_CREATE_SUSPENDED) {
- new_thread->state = PS_SUSPENDED;
+ if (new_thread->attr.suspend == THR_CREATE_SUSPENDED)
new_thread->flags = THR_FLAGS_SUSPENDED;
- }
- else
- new_thread->state = PS_RUNNING;
+ new_thread->state = PS_RUNNING;
/*
* Schedule the new thread.
*/
@@ -258,10 +249,10 @@
free_stack(struct pthread *curthread, struct pthread_attr *pattr)
{
if ((pattr->flags & THR_STACK_USER) == 0) {
- THR_LOCK_ACQUIRE(curthread, &_thread_list_lock);
+ THREAD_LIST_LOCK(curthread);
/* Stack routines don't use malloc/free. */
_thr_stack_free(pattr);
- THR_LOCK_RELEASE(curthread, &_thread_list_lock);
+ THREAD_LIST_UNLOCK(curthread);
}
}
@@ -273,8 +264,8 @@
/* Thread was created with all signals blocked, unblock them. */
__sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL);
- if (curthread->flags & THR_FLAGS_SUSPENDED)
- _thr_sched_switch(curthread);
+ if (curthread->flags & THR_FLAGS_NEED_SUSPEND)
+ _thr_suspend_check(curthread);
/* Run the current thread's start routine with argument: */
pthread_exit(curthread->start_routine(curthread->arg));
More information about the p4-projects
mailing list