From owner-freebsd-current Tue Jul 9 0: 0:31 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CF9E37B400 for ; Tue, 9 Jul 2002 00:00:25 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74B0843E64 for ; Tue, 9 Jul 2002 00:00:24 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020709070023.URES29588.sccrmhc01.attbi.com@InterJet.elischer.org> for ; Tue, 9 Jul 2002 07:00:23 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA33113 for ; Mon, 8 Jul 2002 23:40:47 -0700 (PDT) Date: Mon, 8 Jul 2002 23:40:46 -0700 (PDT) From: Julian Elischer To: FreeBSD current users Subject: userret() , ast() and the end of syscalls Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG A question to those who know.. why is userret() called both at the end of trap() or syscall() and also almost immediatly again (often) at the end of ast(). It seems that really there is no one place that one can put code that will be called ONCE and ONLY ONCE as a thread progresses to userland. There is no one place where you can say "after this point we are in userland" right up until that iret instruction. There is always the danger that FTER ny insruction that decides that we are now definitly going to user space, there could occur an interrupt that causes a reschedule so that some OTHER thread goes to user land. Is it possible to clear interrupts and have the iret instruction itself re-enable them? (that would give a few instructions 'atomically' with the iret which may be all I need). is this possible in other architectures? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message