Commit Graph

47 Commits

Author SHA1 Message Date
sperber f28a5f7dbb Merge rev 120 from Scheme 48 svn repo:
Modified:
   s48/tuebingen/trunk/scheme/rts/jar-defrecord.scm
Log:
Subject: Fix hygiene bug in DEFINE-RECORD-TYPE

DEFINE-RECORD-TYPE would expand into the wrong thing if there was a
field name identical to the name of the type that appears as a
constructor argument; the constructor used that same name as a
parameter, shadowing the name for the type.  The fix was to rename
those parameters before including them in the output.
2003-03-18 12:48:53 +00:00
mainzelm 855cffa3c7 Provide LOAD-PORT to load forms from a port. 2003-03-13 07:49:49 +00:00
mainzelm 1b63d1f270 Use with-sigevents to initialize the sigevent system. This also keeps
track wether the thunk retuned in which case WAITING-FOR-SIGEVENT?
will now always return #f.

This makes it possible for the root-scheduler to stop even though
there are threads waiting for signals.
2003-02-25 08:11:32 +00:00
sperber ad18648afa Fix some problems with WAIT-FOR-CHANNELS:
- Initialize READY-{READ,WRITE}-CHANNELS to () instead of #f, because
  the #f's don't get overwritten when the whole thing is interrupted.
- Fix the cleanup code which was conditionalized the wrong way.
2003-01-17 13:30:26 +00:00
mainzelm 6a8b7f6145 When closing an output port, capture any errors while flushing the
port and try to close the port immediately instead.
2003-01-08 09:26:58 +00:00
mainzelm 5da13e0f55 Merged definition of byte-vector from S48 1.0. 2003-01-07 10:30:37 +00:00
sperber 3a1439a16e Remove warning message "Warning: dropping ignored channel i/o result"
because it can be legitimately triggered by WAIT-FOR-CHANNELS.
2002-12-11 12:40:29 +00:00
sperber 6fc80dfb4b Fix typo: remove double application of MAKE-I/O-COMPLETION-HANDLER. 2002-11-12 13:13:02 +00:00
mainzelm 9950aa7205 Wrap an additional (lambda a ...) around the application of (terminate-current-thread) in terminate-thread! as the continuation may provide any number of values 2002-09-18 19:16:23 +00:00
mainzelm 5cb76fd27b Replace call to channel-has-waiter? by channel-check-waiter. 2002-09-17 21:22:41 +00:00
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
mainzelm 4e5b87209d Added ignore-port-locks? flag to output-port-forcers and use it in
flush-all-ports-no-threads.
2002-06-26 11:25:33 +00:00
mainzelm bbfd094bbd Queue os-signal events. 2002-06-10 08:46:08 +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
sperber 2a302178e6 Provide names for housekeeping threads for better debugging. 2002-05-03 13:36:15 +00:00
mainzelm ffa5461a39 Added fluid-cell-ref and fluid-cell-set!. 2002-04-04 08:22:20 +00:00
mainzelm 5aee745efb New module language from S48 0.57. 2002-04-03 12:17:19 +00:00
sperber b4312d028c Be even more thorough about releasing port locks after exceptions. 2002-02-28 08:29:04 +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
sperber 12ced00589 Make sure port locks get released after I/O errors. 2002-02-26 14:40:21 +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 1ed75d8531 Let thread-uid->thread invoke the GC if it encounters multiple threads with the same uid. 2001-11-08 10:24:41 +00:00
mainzelm 9552e7900a A thread may life in multiple queues. 2001-10-04 11:16:15 +00:00
mainzelm 2e3dd4b65c Fixed small typo. 2001-09-12 13:42:29 +00:00
sperber 7a45d9cc01 Change from Richard, Scheme 48 0.56 -> 0.56.9:
Define exception handler for TIME opcode.
2001-07-10 13:13:27 +00:00
mainzelm 8b44999d55 Really fixed the bug in sleep. The previous fix was totally broken. 2001-06-07 16:14:29 +00:00
mainzelm fd264012b9 Added argument conversion for sleep (prevents a core dump on inexact numbers). 2001-05-30 15:55:55 +00:00
sperber 1e212d78a4 Bug fix:
I had forgotten to mark the thread-cell value environment as read-only
when it's passed on to a spawned thread.  Do that now.
2001-05-28 13:31:01 +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 384c28fab4 Hand out the port and not just port-data to the handler. 2001-04-09 07:55:50 +00:00
mainzelm 25f395c1d0 * New package definitions now that we have SRFI-13 and 14
* Introduced the nomenclature "sigevent"
2001-03-23 12:45:31 +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 9035313159 Added nested multi-line comments. The implementation has two
drawbacks:
1.) Since # and | may be part of an identifier, a#|bla|# is
read as a#|bla|# not as a.

2.) The REPL won't read a comment for its own, it will wait for
another value:
>#|bla|#

3
3
>
2001-01-12 18:16:42 +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
mainzelm 435afc1e2b Changes for Cygwin. 2001-01-09 15:49:29 +00:00
marting b39fd47d82 Renamed byte-vector to code-vector. 2000-07-27 13:28:40 +00:00
marting 8c4d87dde6 replaced code-vector by byte-vector (not that this is a real difference) 1999-11-04 20:43:36 +00:00
marting f8975842de load-port/load-into-port now yield errors when called, since I don't know where they could be used 1999-10-08 18:06:39 +00:00
marting c2045e6407 the vm interrupt-handler is no longer abused for wie now make everything via os-signal 1999-10-08 18:05:06 +00:00
marting 4e935c24a5 just a snapshot 1999-09-23 14:36:25 +00:00
marting 7073fef5c3 added dfishers interrupt handler, but call (/ 1 0) before... 1999-09-16 16:12:57 +00:00
marting 20081c537b added dfishers steal-port stuff 1999-09-16 16:09:40 +00:00
marting 0cdf8896be added dfishers steal-port stuff 1999-09-16 16:01:21 +00:00
marting 30a11632fb inserted almost everything from scsh-read, except for the #! stuff 1999-09-15 01:03:43 +00:00
marting 606245fc41 *** empty log message *** 1999-09-14 12:45:02 +00:00