From owner-freebsd-arch Sat Feb 16 11: 6:46 2002 Delivered-To: freebsd-arch@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id E286837B400 for ; Sat, 16 Feb 2002 11:06:43 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g1GJ6hJ12493; Sat, 16 Feb 2002 11:06:43 -0800 (PST) (envelope-from dillon) Date: Sat, 16 Feb 2002 11:06:43 -0800 (PST) From: Matthew Dillon Message-Id: <200202161906.g1GJ6hJ12493@apollo.backplane.com> To: Matthew Dillon Cc: Peter Wemm , Dan Eischen , arch@FreeBSD.ORG Subject: Re: MFC makecontext(), getcontext(), setcontext()?, also would be nice to have some cleanups References: <20020206195918.6350039F1@overcee.wemm.org> <200202161842.g1GIgFF89658@apollo.backplane.com> 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 Oops, actually I'm wrong here. I didn't realize that these were statically setting the signal mask. Let me rephrase this: There are many cases where the signal mask does not have to be messed with. It would be really nice if setcontext()/getcontext() could be told not to screw with it, perhaps with a flag. Making a system call every single time setcontext() or getcontext() is called is extremely wasteful and slows down the context switch by an insane amount. So scrap my previous sample code and instead replace with code that simply checks the flags field for a flag that tells it to ignore the signal mask. -Matt Matthew Dillon : : It would be nice if getcontext() and setcontext() could be told : not to screw around with the signal mask, similar to what sigsetjmp() : and siglongjmp() do if the savemask is empty. Perhaps something like : this: : : BEFORE: :... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message