[BUG][Linux] VM2.8 port eats processor cycles

Lex Spoon lex at cc.gatech.edu
Fri Jul 7 12:21:23 UTC 2000


> Well, sorta.
> The setSocketPollFunction is called by the socket plugin (remember, you
> have to grep _all_ the sources) in its initialiseModule() code. So if
> you haven't done a socket call, then yes I guess you never go to sleep.
> 

This problem is a little awkward, because multiple modules are interacting on
one issue.

How about doing it this way.  The sleep routine is in the *main* part of
the Unix VM, and the socket routines can register file descriptors that
should interrupt the sleep.  Basically, make the socket sleep routine
more generic and move it out of the sockets plugin.

The main difficulty is that when you load the sockets plugin, the
sockets plugin needs to be able to access the fd-registration functions
over in the main VM.  I dunno exactly how the plugins stuff works; would
it be okay for a plugin to just directly call functions in the main VM,
or do we need to pass those functions as parameters?  If the latter, is
there space in the initializeModule() routine for adding the backpointer
to those functions?!

Note, by the way, that other plugins might want to register file
descriptors like this, as well.  For example, the sound module should
really work this way.  So it's not just a bad feeling that many of us
get about giving the sockets plugin special treatment--it can cause real
trouble down the line.


The bad part of all this is that some code has to be rewritten....



-Lex





More information about the Squeak-dev mailing list