From owner-freebsd-threads@FreeBSD.ORG Mon May 5 16:58:49 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F4C637B401 for ; Mon, 5 May 2003 16:58:49 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id D95BB43F93 for ; Mon, 5 May 2003 16:58:48 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h45NwiBg019981; Mon, 5 May 2003 19:58:44 -0400 (EDT) Received: from localhost (eischen@localhost)h45NwiH1019978; Mon, 5 May 2003 19:58:44 -0400 (EDT) Date: Mon, 5 May 2003 19:58:44 -0400 (EDT) From: Daniel Eischen To: Julian Elischer In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: kern_threads.c.. upcall question.. X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2003 23:58:49 -0000 On Mon, 5 May 2003, Julian Elischer wrote: > > In kern_threads.c, in function thread_export_context() > it first does a copyin() of the > context storage area. I think this is un-needed (and a complete waste of > cycles) but I am not sure if there is some strange condition > regarding floating point registers or something that may want this.. > > Dan, Jon, David? > do any of you have a good reason why I shouldn't remove the copyin().?? Yeah, the threads library keeps the thread's active signal mask in the context area. The stack and flags may also be used in the context. You should be able to safely copy out the mcontext without a copyin(). Is that what you're currently doing? Or is the entire context (ucontext) being exported? -- Dan Eischen