Building latest Unix VM - how?

David Pennell dpennell at fastmail.fm
Sun Jan 20 03:48:42 UTC 2002


On 19 Jan 2002 22:54:46 +0100, "Cees de Groot" <cg at home.cdegroot.com>
said:
> 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...

Yes, indeed.  You get to decide whether to get notified on I/O completion
via an event flag or with a call back - on I/O of any kind.

> 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 :-)).
> 
And don't forget about EAGAIN - we've been gradually fixing these in VW
on
Solaris.  They seem to show up under low resource conditions...

-david
-- 
  David Pennell
  dpennell at fastmail.fm



More information about the Squeak-dev mailing list