From owner-cvs-all@FreeBSD.ORG Wed Apr 2 19:34:53 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61E4937B40B; Wed, 2 Apr 2003 19:34:51 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0E5543FA3; Wed, 2 Apr 2003 19:34:50 -0800 (PST) (envelope-from jake@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h333Yo0U065904; Wed, 2 Apr 2003 19:34:50 -0800 (PST) (envelope-from jake@repoman.freebsd.org) Received: (from jake@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h333YowN065903; Wed, 2 Apr 2003 19:34:50 -0800 (PST) Message-Id: <200304030334.h333YowN065903@repoman.freebsd.org> From: Jake Burkholder Date: Wed, 2 Apr 2003 19:34:50 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libthr/arch/i386/i386 _setcurthread.c src/lib/libthr/arch/sparc64/sparc64 _setcurthread.c src/lib/libthr/thread thr_create.c thr_init.c thr_private.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2003 03:34:53 -0000 jake 2003/04/02 19:34:50 PST FreeBSD src repository Modified files: lib/libthr/arch/i386/i386 _setcurthread.c lib/libthr/arch/sparc64/sparc64 _setcurthread.c lib/libthr/thread thr_create.c thr_init.c thr_private.h Log: - Pass a ucontext_t to _set_curthread. If non-NULL the new thread is set as curthread in the new context, so that it will be set automatically when the thread is switched to. This fixes a race where we'd run for a little while with curthread unset in _thread_start. Reviewed by: jeff Revision Changes Path 1.3 +6 -2 src/lib/libthr/arch/i386/i386/_setcurthread.c 1.2 +5 -2 src/lib/libthr/arch/sparc64/sparc64/_setcurthread.c 1.3 +4 -4 src/lib/libthr/thread/thr_create.c 1.3 +1 -1 src/lib/libthr/thread/thr_init.c 1.4 +2 -2 src/lib/libthr/thread/thr_private.h