Date: Thu, 21 Mar 2002 12:34:11 +0900 From: shudo@computer.org To: billh@gnuppy.monkey.org Cc: java@FreeBSD.ORG Subject: Re: Mozilla core... & HotSpot update Message-ID: <200203210334.MAA16035@cafe.muraoka.info.waseda.ac.jp> In-Reply-To: <20020320201858.GA3125@gnuppy.monkey.org> References: <200203201509.PAA29782@sorley.cogsci.ed.ac.uk> <20020320201858.GA3125@gnuppy.monkey.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203210334.MAA16035>