[gambit-list] More DS porting issues

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

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.


> 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.


Version: GnuPG v1.4.3 (Darwin)


More information about the Gambit-list mailing list