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.
And ... select() doesn't work in dswifi. Sigh.
Any advice for how to fake a "select" with polling? What kind of repercussions are there going to be if I return from the select too early? Are there going to be implications if the select() for sockets if different from the select() for stderr/stdout?
Thanks, -a
Afficher les réponses par date
-----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
Marc Feeley wrote:
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.
How do you want them? Since I have everything in a Mercurial repository, it would probably be best if I could actually push/pull the entire repository to you. That way you can break up the refactoring into chunks and examine things in pieces.
I can send it as just a patchfile, but there was quite a bit of refactoring. I'm not sure how understandable that's going to be.
As a side note, I also created SCons files; the scons stuff is how I did the cross compile. You can build a Gambit distribution using SCons once you have a config.h file.
-a