From owner-freebsd-java Wed Mar 20 19:35:21 2002 Delivered-To: freebsd-java@freebsd.org Received: from cafe.muraoka.info.waseda.ac.jp (cafe.muraoka.info.waseda.ac.jp [133.9.68.49]) by hub.freebsd.org (Postfix) with ESMTP id 7031C37B400 for ; Wed, 20 Mar 2002 19:35:13 -0800 (PST) Received: from muraoka.info.waseda.ac.jp (shudoh@localhost [127.0.0.1]) by cafe.muraoka.info.waseda.ac.jp (8.9.1a/3.7W) with ESMTP id MAA16035; Thu, 21 Mar 2002 12:34:11 +0900 Message-Id: <200203210334.MAA16035@cafe.muraoka.info.waseda.ac.jp> To: billh@gnuppy.monkey.org Cc: java@FreeBSD.ORG Subject: Re: Mozilla core... & HotSpot update From: shudo@computer.org In-Reply-To: <20020320201858.GA3125@gnuppy.monkey.org> References: <200203201509.PAA29782@sorley.cogsci.ed.ac.uk> <20020320201858.GA3125@gnuppy.monkey.org> Date: Thu, 21 Mar 2002 12:34:11 +0900 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Bill, Your work on porting HotSpot looks to be filled with pleasant :) > "HotSpot" > [OS glue layer] > > 1) There's a couple of problems with interruptable IO that are a bit > semantically confusing such as the SYSV and BSD behaviors of a syscall > during the delivery of a signal. Should it return EINT like in SYSV ? It is certaion that the semantics os signal() about interruption of I/O related system calls depend on the kind of OS. On BSD systems, the interrupted syscalls restart automatically after return from the signal handler, but System V and Linux make the syscalls return with errno being EINTR. But, BSD also has sigaction() (and SA_SIGINFO) prescribed by POSIX.1. With sigaction(), we can control the semantics of the automatic restart of syscalls with SA_RESTART flag in `sa_flags' member of the struct sigaction. And, if using sigaction(), even BSD is compliant with other OSes like SysV and Linux. The semantics of BSD signal (signal()) is as follows. I confirmed these on FreeBSD 3.2R in anciant days, but recent FreeBSDs may be the same. SA_NODEFER is false Delivery of another signal is deferred during a signal handler is executed. SA_RESETHAND is false Signal handlig functions are not cleared automatically. SA_RESTART is *true* An interrupted I/O related syscalls restart automaticaly. This characterize the BSD signal. The default semantics of POSIX signal (sigaction()) define all these flags as false (SIG_DFL is defined as 0). Please try `man sigaction'. > I've been pretty isolated doing this stuff and the topic of JIT > compilers are rather obscure so I don't really have a clique of > folks to yack with constantly about these issues. Diving into such a deep structure is very exciting. Enjoy! Kazuyuki Shudo shudo@computer.org http://www.shudo.net/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message