[gambit-list] More DS porting issues

Marc Feeley feeley at iro.umontreal.ca
Thu Nov 16 09:18:21 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 16-Nov-06, at 7:50 AM, Andrew Lentvorski wrote:

> Okay, I have a repl and it's stable.  That wasn't too bad.

Great!

>
> I can start web-repl.scm and get to a select statement.  That was a
> pain.  I had to do a pretty large refactor spanning quite a bit of the
> os_XX files.  It has a lot of POSIX'ness wired into the assumption.

Please send me your modifications when you are done so I can put them  
into the next release.

>
> And ... select() doesn't work in dswifi.  Sigh.

Yes that's a bummer, but not a show stopper.

>
> Any advice for how to fake a "select" with polling?

You can simply remove the select, and mark all devices as ready for I/ 
O.  The scheduler will then wake up all the threads blocked on I/O,  
they will attempt their I/O again, and block until the next time  
___device_select is called.  In ___device_select you can add a  
"sleep" until the timeout if you are worried about power usage.

>   What kind of
> repercussions are there going to be if I return from the select too
> early?

None visible from the Scheme level, but the system as a whole will be  
less efficient at I/O.  But you will have to try it out to know by  
how much (my guess is that you will lose little if there are few  
concurrent threads which are blocking on I/O).

>   Are there going to be implications if the select() for sockets
> if different from the select() for stderr/stdout?

I'm not sure what you mean, since you are suggesting to not have a  
select for sockets and I thought your stdio was blocking.

Marc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFXHMt//V9Zc2T/v4RAqSyAJ4m8m3OCmfCt4s619/TyfkUNfu3fgCgkmKT
zQbkOo77eBXoWXELqTJ0prU=
=qv61
-----END PGP SIGNATURE-----



More information about the Gambit-list mailing list