From owner-freebsd-arch Tue Feb 5 14:53:18 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mail.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 7BA8437B41D; Tue, 5 Feb 2002 14:53:05 -0800 (PST) Received: from localhost (eischen@localhost) by mail.pcnet.com (8.12.1/8.12.1) with ESMTP id g15Mr1hR001434; Tue, 5 Feb 2002 17:53:01 -0500 (EST) Date: Tue, 5 Feb 2002 17:53:01 -0500 (EST) From: Daniel Eischen To: Julian Elischer Cc: Matthew Dillon , Dan Eischen , bde@FreeBSD.ORG, peter@FreeBSD.ORG, arch@FreeBSD.ORG Subject: Re: getsetcontext system call In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 5 Feb 2002, Julian Elischer wrote: > On Tue, 5 Feb 2002, Daniel Eischen wrote: > > > On Tue, 5 Feb 2002, Julian Elischer wrote: > > > On Tue, 5 Feb 2002, Daniel Eischen wrote: > > > > > > > On Tue, 5 Feb 2002, Matthew Dillon wrote: > > > > > I thought we were trying to avoid having to make any system calls on > > > > > a userland thread context switch. > > > > > > > > In the threads library, we'll use our own library routines to > > > > do this (hopefully) without having to make a system call. > > > > > > Or maybe use kernel entries that are already hapenning anyway..... > > > > Huh? > > I was thinking that when saving thread context back to userland > after completing a syscall but before going on to another > syscall, we can save lots of FP state etc as well. Yeah, I was assuming that under a KSE enabled process, the state of blocked threads gets saved out to userland in mcontext_t format (which would include the FPU state, if used). But the threads library can also force a context switch without having it blocked in the kernel, so the threads library needs the equivalent of a getcontext() as well as setcontext(). -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message