From owner-p4-projects@FreeBSD.ORG Fri Dec 31 14:56:04 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DCA8316A4D0; Fri, 31 Dec 2004 14:56:03 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EF0216A4CE for ; Fri, 31 Dec 2004 14:56:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70A0C43D1F for ; Fri, 31 Dec 2004 14:56:03 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBVEu3kj009184 for ; Fri, 31 Dec 2004 14:56:03 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBVEu3sq009181 for perforce@freebsd.org; Fri, 31 Dec 2004 14:56:03 GMT (envelope-from davidxu@freebsd.org) Date: Fri, 31 Dec 2004 14:56:03 GMT Message-Id: <200412311456.iBVEu3sq009181@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 67977 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 14:56:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=67977 Change 67977 by davidxu@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));