Commit Graph

26 Commits

Author SHA1 Message Date
sperber 33c14d7901 First stab at implementing SELECT/SELECT!:
- extend the VM interrupts to distinguish between read and write
  events
- add new ADD-PENDING-CHANNEL instruction to the VM
- add WAIT-FOR-CHANNELS procedure to the run-time system
- implement SELECT and SELECT! on top of that in newports.scm

This runs some basic tests, but in general should be considered
largely untested.

Moreover, SELECT/SELECT! never detect any exceptional conditions---the
returned vectors are always empty.  This is because the VM doesn't
really track those, and it's unclear whether it would be worth the
effort.
2002-08-20 14:03:01 +00:00
sperber ac343ba970 Replace Martin's implementation of selective blocking by the one in
Scheme 48 1.0.1.

Namely, instead of associating a list of queues with every thread, we
associate a single cell, holding the thread.  That cell is stored in
thread queues, and once a thread is made runnable again, the cell is
set to #f.  The thread-queue accessors ignore cells containing #f.

Implement an experimental OBTAIN-LOCK-MULTIPLE to test the whole
thing.
2002-08-16 14:11:50 +00:00
sperber 1d35626709 Redo the forking-without-the-threads fix in a way not involving
command levels (as there *are* no command levels for things like scsh
-c):

There's now a new asynchronous event, similar to SPAWN, called NARROW.
It spawns off a new scheduler with just one thread (which runs the
thunk provided as an argument to NARROW) and blocks the current one
until the narrowed scheduler finishes.

For this to work, two schedulers need to be in place: the root
scheduler which performs the housekeeping, and another one inside that
which is the one the program uses---otherwise it's the root scheduler
that's blocked, and that means no housekeeping gets done.  This is
trivially the case for interactive mode, as the command-levels all
have their own schedulers, but we also need to make sure scsh's entry
point fires up its own initial scheduler.
2002-05-03 13:42:36 +00:00
mainzelm ffa5461a39 Added fluid-cell-ref and fluid-cell-set!. 2002-04-04 08:22:20 +00:00
mainzelm 06b68b7c5e Cells as stob (from S48 0.57). 2002-04-04 08:13:53 +00:00
mainzelm 5aee745efb New module language from S48 0.57. 2002-04-03 12:17:19 +00:00
sperber f5d853712b Remove STEAL-CHANNEL-PORT! which has been unused for a while now and
uncomfortably shared code with STEAL-PORT!
2002-02-28 08:28:32 +00:00
mainzelm 284d89fe12 Added hook to align cwd and umask for the S48 system. 2001-12-19 09:14:15 +00:00
sperber 136e313af7 New implementation of (no-inheritance) thread-local cells and thread
fluids.

New implementation of syslog.

Both are to be compatible with what's actually probably going into
Scheme 48.
2001-12-03 15:21:46 +00:00
mainzelm 405512e0db Expported the rest of the port-handler accessors. 2001-10-25 07:24:42 +00:00
mainzelm fe6a9db1e5 Renamed scsh-events to sigevents. 2001-10-18 09:02:52 +00:00
mainzelm 9552e7900a A thread may life in multiple queues. 2001-10-04 11:16:15 +00:00
mainzelm 68eb897e20 Merged in macro expander changes from Scheme 48 0.56. 2001-07-09 14:15:05 +00:00
sperber 21a8e255eb Added thread-cells structure for thread-local cells.
These can be used (together with fluids) to implement something akin
to PLT's and Chez's parameters for holding thread-local state such as
CWD, syslog channel, etc.
2001-05-22 14:58:15 +00:00
mainzelm 9b4bb8a19d Adapted some of Richard's changes for char-ready? and output-port-ready?. 2001-03-23 10:59:07 +00:00
mainzelm c1d6d368e5 Built the event system directly into the RTS. Built sighandlers above
it. Removed machinery in low-interrupt.
2001-01-09 15:52:52 +00:00
marting b39fd47d82 Renamed byte-vector to code-vector. 2000-07-27 13:28:40 +00:00
marting 9512af2d3f added set-port-handler! for set-port-buffering 1999-11-04 16:31:25 +00:00
marting 1d4d7d0e0c snapshot, this version should work quite well 1999-10-08 18:41:05 +00:00
marting 18d41a4a16 removed some exports for scsh 1999-10-05 14:54:37 +00:00
marting bca77db078 daily snapshot, mainly changes to get 0.5.2 stuff running 1999-09-24 23:54:22 +00:00
marting b5771115b6 changes to get the 0.5.2 stuff running. Not yet completed, hangs on startup 1999-09-23 23:02:54 +00:00
marting dd7939ab1a start scsh-toplevel by dump-scsh, scsh's init are not yet done 1999-09-23 00:43:13 +00:00
marting eaf83d0524 added some exports for scsh 1999-09-19 19:03:51 +00:00
marting dd5c5ebc81 added dfishers steal-port stuff 1999-09-16 16:50:17 +00:00
marting 606245fc41 *** empty log message *** 1999-09-14 12:45:02 +00:00