From owner-freebsd-current Tue Jul 9 1:17:53 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 0AACA37B400 for ; Tue, 9 Jul 2002 01:17:50 -0700 (PDT) Received: from mail.viasoft.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id A866943E09 for ; Tue, 9 Jul 2002 01:17:47 -0700 (PDT) (envelope-from davidx@viasoft.com.cn) Received: from davidwnt (davidwnt.viasoft.com.cn [192.168.1.239]) by mail.viasoft.com.cn (8.9.3/8.9.3) with SMTP id QAA11256; Tue, 9 Jul 2002 16:33:46 +0800 Message-ID: <013b01c2271f$ce6e9be0$ef01a8c0@davidwnt> From: "David Xu" To: "Julian Elischer" , "FreeBSD current users" References: Subject: Re: userret() , ast() and the end of syscalls Date: Tue, 9 Jul 2002 16:08:16 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 I found the problem two weeks ago, but I can not find a better way to avoid userret() to be called twice. so I keep silence. :( David Xu Gartner: Apache is vulnerable, we recommend switching back to IIS to = protect yourselves ----- Original Message -----=20 From: "Julian Elischer" To: "FreeBSD current users" Sent: Tuesday, July 09, 2002 2:40 PM Subject: userret() , ast() and the end of syscalls >=20 > A question to those who know.. >=20 > why is userret() called both at the end of trap() or syscall() > and also almost immediatly again (often) at the end of ast(). >=20 > 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. >=20 > 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. >=20 > 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). >=20 > is this possible in other architectures? >=20 >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message