From owner-cvs-src@FreeBSD.ORG Thu Aug 7 01:03:06 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 683F937B401; Thu, 7 Aug 2003 01:03:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE37343FB1; Thu, 7 Aug 2003 01:03:05 -0700 (PDT) (envelope-from marcel@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 h778350U056653; Thu, 7 Aug 2003 01:03:05 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h7783558056652; Thu, 7 Aug 2003 01:03:05 -0700 (PDT) Message-Id: <200308070803.h7783558056652@repoman.freebsd.org> From: Marcel Moolenaar Date: Thu, 7 Aug 2003 01:03:05 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libpthread/arch/ia64/ia64 context.S src/lib/libpthread/arch/ia64/include pthread_md.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2003 08:03:07 -0000 marcel 2003/08/07 01:03:05 PDT FreeBSD src repository Modified files: lib/libpthread/arch/ia64/ia64 context.S lib/libpthread/arch/ia64/include pthread_md.h Log: Grok async contexts. When a thread is interrupted and an upcall happens, the context of the interrupted thread is exported to userland. Unlike most contexts, it will be an async context and we cannot easily use our existing functions to set such a context. To avoid a lot of complexity that may possibly interfere with the common case, we simply let the kernel deal with it. However, we don't use the EPC based syscall path to invoke setcontext(2). No, we use the break-based syscall path. That way the trapframe will be compatible with the context we're trying to restore and we save the kernel a lot of trouble. The kind of trouble we did not want to go though ourselves... However, we also need to set the threads mailbox and there's no syscall to help us out. To avoid creating a new syscall, we use the context itself to pass the information to the kernel so that the kernel can update the mailbox. This involves setting a flag (_MC_FLAGS_KSE_SET_MBOX) and setting ifa (the address) and isr (the value). Revision Changes Path 1.4 +14 -0 src/lib/libpthread/arch/ia64/ia64/context.S 1.9 +27 -9 src/lib/libpthread/arch/ia64/include/pthread_md.h