Building latest Unix VM - how?

Cees de Groot cg at home.cdegroot.com
Sat Jan 19 21:54:46 UTC 2002


Lex Spoon <lex at cc.gatech.edu> said:
>If you want to build it Right Now, I think the best place to start is at
>this page:
>
>	http://minnow.cc.gatech.edu/squeak/2173
>
Yup. It compiles out-of-the-box, thanks.

>The way to fix it is to put a while loop around every system call, and
>repeat it until it returns something other than EINTR.  For example,
>instead of:
>
>	fd = open(filename, O_RDONLY);
>
>Do this:
>
>	while((fd = open(filename, O_RDONLY)) < 0
>	      &&  errno == EINTR)
>		;
>
>
>Yes, with *every* system call....  Yay Unix!  Some Unices have
>improvements on this state, but I think that many do not, and so this
>must be done the hard way to be portable.
>
Yeah, always when doing Unix I/O I long for my VMS hacking days...

Anyway, it wouldn't be too hard to fiddle a bit with code generation
here, methinks. It's not *every* system call that can return EINTR, so
there's just a subset of the code that needs to be fixed (redirect read()
to sqSafeRead(), etcetera). It'd be great to get Squeak CPU-friendlier,
for me the constant CPU usage is probably the thing that keeps me most
from pushing it as a hosting platform (that's where my personal agenda
wants to take it, among others :-)).

(BTW, I don't think open() can return EINTR. A grep through the Linux
section 2 manpages returns 'accept chdir chmod chown chroot close connect
dup execve fcntl mknod msgop nanosleep pause poll read readv recv select
semop send sigaction sigpause stat truncate unlink ustat utime wait
wait4 write')

Wouldn't it be an idea to start working in this direction? Wrapping the system
calls is just dumb typing work, I'm sure that the 20-or-so people that are on
the Sqeak SF project developer list - or at least the subset with an interest
in Linux/Unix - could do that in a couple of days. 

-- 
Cees de Groot               http://www.cdegroot.com     <cg at cdegroot.com>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B



More information about the Squeak-dev mailing list