mit-scheme.git
9 years agosmp: without-interrupts: gencache.scm
Matt Birkholz [Sat, 21 Feb 2015 18:43:34 +0000 (11:43 -0700)]
smp: without-interrupts: gencache.scm

9 years agosmp: without-interrupts: gdbm.scm
Matt Birkholz [Sat, 21 Feb 2015 18:42:37 +0000 (11:42 -0700)]
smp: without-interrupts: gdbm.scm

9 years agosmp: README.txt wordsmithing. Squash into be90997.
Matt Birkholz [Sat, 21 Feb 2015 18:41:02 +0000 (11:41 -0700)]
smp: README.txt wordsmithing.  Squash into be90997.

9 years agosmp: README.txt correction. Squash into ae2e9ce.
Matt Birkholz [Sat, 21 Feb 2015 18:35:36 +0000 (11:35 -0700)]
smp: README.txt correction.  Squash into ae2e9ce.

9 years agosmp: README.txt wordsmithing. Squash into 9969ff0.
Matt Birkholz [Sat, 21 Feb 2015 18:33:00 +0000 (11:33 -0700)]
smp: README.txt wordsmithing.  Squash into 9969ff0.

9 years agosmp: (runtime wind) initialization. Squash into fca7e9c, which also
Matt Birkholz [Sat, 21 Feb 2015 18:17:26 +0000 (11:17 -0700)]
smp: (runtime wind) initialization.  Squash into fca7e9c, which also

needs to drop a line from make.scm, a line which did not disappear
until 99bc079.

9 years agosmp: without-interrupts: gcfinal.scm
Matt Birkholz [Sat, 21 Feb 2015 18:10:31 +0000 (11:10 -0700)]
smp: without-interrupts: gcfinal.scm

9 years agosmp: without-interrupts: gc.scm
Matt Birkholz [Sat, 21 Feb 2015 01:05:21 +0000 (18:05 -0700)]
smp: without-interrupts: gc.scm

9 years agosmp: without-interrupts: floenv.scm
Matt Birkholz [Tue, 27 Jan 2015 23:53:37 +0000 (16:53 -0700)]
smp: without-interrupts: floenv.scm

9 years agosmp: without-interrupts: ffi.scm
Matt Birkholz [Sat, 31 Jan 2015 00:45:44 +0000 (17:45 -0700)]
smp: without-interrupts: ffi.scm

9 years agosmp: without-interrupts: emacs.scm
Matt Birkholz [Tue, 27 Jan 2015 20:27:36 +0000 (13:27 -0700)]
smp: without-interrupts: emacs.scm

9 years agosmp: without-interrupts: crypto.scm
Matt Birkholz [Tue, 27 Jan 2015 20:27:03 +0000 (13:27 -0700)]
smp: without-interrupts: crypto.scm

9 years agosmp: without-interrupts: conpar.scm
Matt Birkholz [Tue, 27 Jan 2015 20:26:21 +0000 (13:26 -0700)]
smp: without-interrupts: conpar.scm

9 years agosmp: without-interrupts: condvar.scm
Matt Birkholz [Tue, 27 Jan 2015 20:25:30 +0000 (13:25 -0700)]
smp: without-interrupts: condvar.scm

9 years agosmp: without-interrupts: boot.scm
Matt Birkholz [Tue, 27 Jan 2015 20:24:04 +0000 (13:24 -0700)]
smp: without-interrupts: boot.scm

9 years agosmp: without-interrupts: README.txt begins the analysis
Matt Birkholz [Fri, 16 Jan 2015 22:25:12 +0000 (15:25 -0700)]
smp: without-interrupts: README.txt begins the analysis

9 years agosmp: README.txt frobbery. Squash into d93bc7f and 9969ff0.
Matt Birkholz [Fri, 16 Jan 2015 22:17:35 +0000 (15:17 -0700)]
smp: README.txt frobbery.  Squash into d93bc7f and 9969ff0.

10 years agosmp: share: usrdef.o
Matt Birkholz [Sat, 6 Dec 2014 07:11:24 +0000 (00:11 -0700)]
smp: share: usrdef.o

10 years agosmp: share: comutl.o
Matt Birkholz [Sat, 6 Dec 2014 07:09:58 +0000 (00:09 -0700)]
smp: share: comutl.o

10 years agosmp: share: cmpintmd.o
Matt Birkholz [Sat, 6 Dec 2014 07:07:51 +0000 (00:07 -0700)]
smp: share: cmpintmd.o

10 years agosmp: share: cmpint.o
Matt Birkholz [Sat, 6 Dec 2014 07:04:40 +0000 (00:04 -0700)]
smp: share: cmpint.o

10 years agosmp: share: pruxffi.o
Matt Birkholz [Sat, 6 Dec 2014 07:02:44 +0000 (00:02 -0700)]
smp: share: pruxffi.o

10 years agosmp: share: pruxdld.o
Matt Birkholz [Sat, 6 Dec 2014 07:01:16 +0000 (00:01 -0700)]
smp: share: pruxdld.o

10 years agosmp: share: tterm.o
Matt Birkholz [Sat, 6 Dec 2014 06:56:21 +0000 (23:56 -0700)]
smp: share: tterm.o

10 years agosmp: share: cmpauxmd.o
Matt Birkholz [Sat, 6 Dec 2014 06:53:55 +0000 (23:53 -0700)]
smp: share: cmpauxmd.o

10 years agosmp: share: uxutil.o
Matt Birkholz [Sat, 6 Dec 2014 06:14:08 +0000 (23:14 -0700)]
smp: share: uxutil.o

10 years agosmp: share: uxtty.o
Matt Birkholz [Sat, 6 Dec 2014 06:09:11 +0000 (23:09 -0700)]
smp: share: uxtty.o

10 years agosmp: share: uxtrap.o
Matt Birkholz [Sat, 6 Dec 2014 06:07:28 +0000 (23:07 -0700)]
smp: share: uxtrap.o

10 years agosmp: share: uxtop.o
Matt Birkholz [Sat, 6 Dec 2014 06:03:40 +0000 (23:03 -0700)]
smp: share: uxtop.o

10 years agosmp: share: uxterm.o
Matt Birkholz [Sat, 20 Dec 2014 20:06:03 +0000 (13:06 -0700)]
smp: share: uxterm.o

10 years agosmp: share: uxsock.o
Matt Birkholz [Sat, 6 Dec 2014 05:53:34 +0000 (22:53 -0700)]
smp: share: uxsock.o

10 years agosmp: share: uxsig.o
Matt Birkholz [Sat, 20 Dec 2014 21:42:57 +0000 (14:42 -0700)]
smp: share: uxsig.o

10 years agosmp: share: uxproc.o
Matt Birkholz [Sat, 20 Dec 2014 21:38:24 +0000 (14:38 -0700)]
smp: share: uxproc.o

10 years agosmp: share: uxio.o
Matt Birkholz [Sat, 20 Dec 2014 19:27:28 +0000 (12:27 -0700)]
smp: share: uxio.o

10 years agosmp: share: uxfs.o
Matt Birkholz [Sat, 20 Dec 2014 21:34:56 +0000 (14:34 -0700)]
smp: share: uxfs.o

10 years agosmp: share: uxenv.o
Matt Birkholz [Sat, 6 Dec 2014 01:00:34 +0000 (18:00 -0700)]
smp: share: uxenv.o

10 years agosmp: share: uxctty.o
Matt Birkholz [Sat, 6 Dec 2014 00:56:07 +0000 (17:56 -0700)]
smp: share: uxctty.o

10 years agosmp: share: ux.o
Matt Birkholz [Sat, 6 Dec 2014 00:55:10 +0000 (17:55 -0700)]
smp: share: ux.o

10 years agosmp: share: intext.o
Matt Birkholz [Sat, 6 Dec 2014 00:53:08 +0000 (17:53 -0700)]
smp: share: intext.o

10 years agosmp: share: prossmp.o
Matt Birkholz [Sat, 6 Dec 2014 00:51:32 +0000 (17:51 -0700)]
smp: share: prossmp.o

10 years agosmp: share: prosio.o
Matt Birkholz [Sat, 6 Dec 2014 19:18:02 +0000 (12:18 -0700)]
smp: share: prosio.o

10 years agosmp: share: wind.o
Matt Birkholz [Sat, 6 Dec 2014 00:48:49 +0000 (17:48 -0700)]
smp: share: wind.o

10 years agosmp: share: utils.o
Matt Birkholz [Sat, 6 Dec 2014 00:47:16 +0000 (17:47 -0700)]
smp: share: utils.o

10 years agosmp: share: utabmd.o
Matt Birkholz [Sat, 6 Dec 2014 00:39:30 +0000 (17:39 -0700)]
smp: share: utabmd.o

10 years agosmp: share: transact.o
Matt Birkholz [Sat, 6 Dec 2014 00:37:19 +0000 (17:37 -0700)]
smp: share: transact.o

10 years agosmp: share: term.o
Matt Birkholz [Sat, 6 Dec 2014 00:36:27 +0000 (17:36 -0700)]
smp: share: term.o

10 years agosmp: share: syntax.o
Matt Birkholz [Sat, 6 Dec 2014 19:24:10 +0000 (12:24 -0700)]
smp: share: syntax.o

10 years agosmp: share: string.o
Matt Birkholz [Sat, 6 Dec 2014 00:34:10 +0000 (17:34 -0700)]
smp: share: string.o

10 years agosmp: share: storage.o
Matt Birkholz [Sat, 20 Dec 2014 19:08:15 +0000 (12:08 -0700)]
smp: share: storage.o

10 years agosmp: share: regex.o
Matt Birkholz [Sat, 6 Dec 2014 19:21:02 +0000 (12:21 -0700)]
smp: share: regex.o

10 years agosmp: share: primutl.o
Matt Birkholz [Sat, 20 Dec 2014 19:15:31 +0000 (12:15 -0700)]
smp: share: primutl.o

10 years agosmp: share: ostty.o
Matt Birkholz [Fri, 5 Dec 2014 18:25:03 +0000 (11:25 -0700)]
smp: share: ostty.o

10 years agosmp: share: option.o
Matt Birkholz [Fri, 5 Dec 2014 17:53:32 +0000 (10:53 -0700)]
smp: share: option.o

10 years agosmp: share: obstack.o
Matt Birkholz [Fri, 5 Dec 2014 17:51:44 +0000 (10:51 -0700)]
smp: share: obstack.o

10 years agosmp: share: memmag.o
Matt Birkholz [Fri, 5 Dec 2014 17:49:18 +0000 (10:49 -0700)]
smp: share: memmag.o

10 years agosmp: share: interp.o
Matt Birkholz [Fri, 5 Dec 2014 17:36:49 +0000 (10:36 -0700)]
smp: share: interp.o

10 years agosmp: share: gcloop.o
Matt Birkholz [Fri, 5 Dec 2014 17:34:35 +0000 (10:34 -0700)]
smp: share: gcloop.o

10 years agosmp: share: floenv.o
Matt Birkholz [Fri, 5 Dec 2014 17:25:14 +0000 (10:25 -0700)]
smp: share: floenv.o

10 years agosmp: share: fasload.o
Matt Birkholz [Sat, 20 Dec 2014 18:55:34 +0000 (11:55 -0700)]
smp: share: fasload.o

10 years agosmp: share: fasdump.o
Matt Birkholz [Sun, 21 Dec 2014 04:32:54 +0000 (21:32 -0700)]
smp: share: fasdump.o

10 years agosmp: share: error.o
Matt Birkholz [Fri, 5 Dec 2014 00:24:17 +0000 (17:24 -0700)]
smp: share: error.o

10 years agosmp: share: debug.o
Matt Birkholz [Sat, 6 Dec 2014 20:00:59 +0000 (13:00 -0700)]
smp: share: debug.o

10 years agosmp: share: boot.o
Matt Birkholz [Fri, 5 Dec 2014 00:19:42 +0000 (17:19 -0700)]
smp: share: boot.o

10 years agosmp: share: bkpt.o
Matt Birkholz [Fri, 5 Dec 2014 00:16:21 +0000 (17:16 -0700)]
smp: share: bkpt.o

10 years agosmp: share: avltree.o
Matt Birkholz [Fri, 5 Dec 2014 00:12:57 +0000 (17:12 -0700)]
smp: share: avltree.o

10 years agosmp: share: README.txt begins the analysis of microcode state
Matt Birkholz [Sat, 6 Dec 2014 19:56:10 +0000 (12:56 -0700)]
smp: share: README.txt begins the analysis of microcode state

10 years agosmp: Add a top-level README.txt, an overview of the SMP branch.
Matt Birkholz [Sat, 6 Dec 2014 19:45:40 +0000 (12:45 -0700)]
smp: Add a top-level README.txt, an overview of the SMP branch.

10 years agosmp: Add mutex LOCK/UNLOCK boilerplate to confshared.h (everywhere).
Matt Birkholz [Sat, 20 Dec 2014 18:50:06 +0000 (11:50 -0700)]
smp: Add mutex LOCK/UNLOCK boilerplate to confshared.h (everywhere).

10 years agosmp: Wake io-waiter when necessary. Add io-waiter-registry...
Matt Birkholz [Sat, 20 Dec 2014 21:00:43 +0000 (14:00 -0700)]
smp: Wake io-waiter when necessary.  Add io-waiter-registry...

...a copy of io-registry for io-waiter to block on while other threads
modify io-registry.  Test io-registry in thread-timer-interrupt-
handler only when there is no io-waiter.

10 years agosmp: Add copy-select-registry!.
Matt Birkholz [Wed, 17 Dec 2014 09:12:58 +0000 (02:12 -0700)]
smp: Add copy-select-registry!.

10 years agosmp: Add primitive copy-select-registry.
Matt Birkholz [Wed, 17 Dec 2014 08:48:39 +0000 (01:48 -0700)]
smp: Add primitive copy-select-registry.

10 years agosmp: Add SIGALRM distributor.
Matt Birkholz [Sat, 20 Dec 2014 18:13:30 +0000 (11:13 -0700)]
smp: Add SIGALRM distributor.

10 years agosmp: Add io-waiter and arrange for ONE processor to io-wait.
Matt Birkholz [Sat, 20 Dec 2014 16:27:47 +0000 (09:27 -0700)]
smp: Add io-waiter and arrange for ONE processor to io-wait.

Also, clean up the stack in SMP-IDLE.  And do NOT tail into a runnable
thread in signal-thread-event -- always return.

10 years agosmp: Check for SIGCHLD in thread timer interrupt handler.
Matt Birkholz [Sat, 20 Dec 2014 16:15:03 +0000 (09:15 -0700)]
smp: Check for SIGCHLD in thread timer interrupt handler.

An idle thread might get a SIGCHLD, wake and run the thread timer
interrupt handler (since there is no subprocess-status-change
interrupt) and return to idle.  If it is not the io-waiter, it does
not call test-select-registry nor otherwise notice the subprocess
status change.

Funnel all status change notifications through handle-subprocess-
status-change.  It uses the last-global-tick variable to remember the
tick when threads blocking on status changes were last woken.

10 years agosmp: Add smp-wake primitive.
Matt Birkholz [Sat, 20 Dec 2014 16:05:57 +0000 (09:05 -0700)]
smp: Add smp-wake primitive.

10 years agosmp: Add x86_64 support.
Matt Birkholz [Sat, 20 Dec 2014 15:58:22 +0000 (08:58 -0700)]
smp: Add x86_64 support.

10 years agosmp: unshare: svm1 interpreter's state
Matt Birkholz [Tue, 25 Nov 2014 15:50:37 +0000 (08:50 -0700)]
smp: unshare: svm1 interpreter's state

10 years agosmp: unshare: UX trap_state and current_interruptable_extent.
Matt Birkholz [Tue, 25 Nov 2014 15:46:15 +0000 (08:46 -0700)]
smp: unshare: UX trap_state and current_interruptable_extent.

Split the thread-local parts out of UX_initialize_trap_recovery into
UX_initialize_trap_state, and those of OS_initialize into
OS_initialize_processor.

10 years agosmp: unshare: interpreter_state, dstack, current_transaction...
Matt Birkholz [Tue, 25 Nov 2014 15:07:19 +0000 (08:07 -0700)]
smp: unshare: interpreter_state, dstack, current_transaction...

...scheme_fenv, scheme_fenv_p, dstack_position,
current_winding_record, interpreter_state, prim_apply_error_code,
critical_section_hook, critical_section_hook_p, critical_section_name.

Pulled initializations into a new initialize_processor_early function
and used it in both main and the co-processors' work.

10 years agosmp: Initialize thread-local compiler_utilities.
Matt Birkholz [Sat, 20 Dec 2014 15:50:09 +0000 (08:50 -0700)]
smp: Initialize thread-local compiler_utilities.

Split the thread-local parts of compiler_initialize into
compiler_initialize_processor, those of compiler_reset into
compiler_reset_processor.  Split the non-thread-local parts of
ASM_RESET_HOOK into ASM_INIT_HOOK, i.e. i386_reset_hook into
i386_init_hook.  Call the _processor versions in co-processor startup
and SMP-GC-WAITs.

Add compiler_reset_p flag to processor_t so that load-band
(compiler_reset) can notify the other processors to load the new
compiler_utilities into their Registers slots.

10 years agosmp: Serialize the outf functions.
Matt Birkholz [Sat, 20 Dec 2014 15:44:05 +0000 (08:44 -0700)]
smp: Serialize the outf functions.

10 years agosmp: Synchronize initialized processors.
Matt Birkholz [Sat, 20 Dec 2014 15:37:56 +0000 (08:37 -0700)]
smp: Synchronize initialized processors.

The main pthread must wait for the other processors to be initialized,
else the first GC waits forever for processors that cleared the
global-gc interrupt while initializing.

10 years agosmp: Synchronize processors for GC.
Matt Birkholz [Sat, 20 Dec 2014 15:32:10 +0000 (08:32 -0700)]
smp: Synchronize processors for GC.

10 years agosmp: Add i386 assembly to allocate/access thread-local variables.
Matt Birkholz [Tue, 25 Nov 2014 12:28:27 +0000 (05:28 -0700)]
smp: Add i386 assembly to allocate/access thread-local variables.

Change the storage class of thread-local variables in use thus far.

10 years agosmp: Add configure option --enable-smp.
Matt Birkholz [Fri, 19 Dec 2014 23:53:42 +0000 (16:53 -0700)]
smp: Add configure option --enable-smp.

Arrange for multiple Scheme machines, "processors" (pthreads), to
share the heap.  Each gets its own stack and "local" heap areas.
Gc-flips trace the stacks and evacuate the local heaps into the shared
heap.  The dump-band primitive now works like half a gc-flip,
evacuating the local heaps and saving the shared heap to disk before
the primitive gc daemons can start consing in a local heap again.

10 years agosmp: Punt "permanent" i/o thread events.
Matt Birkholz [Fri, 19 Dec 2014 21:50:27 +0000 (14:50 -0700)]
smp: Punt "permanent" i/o thread events.

A "permanent" input channel in the system select registry will cause
the io-waiter to spin until a thread reads the available input.
Always removing an entry after its event is delivered allows the
io-waiter to block until the thread processes the event, reads the
available input, and blocks again.

10 years agosmp: Serialize access to (runtime thread) internals.
Matt Birkholz [Sun, 21 Dec 2014 19:02:38 +0000 (12:02 -0700)]
smp: Serialize access to (runtime thread) internals.

10 years agosmp: Accommodate multiple processors.
Matt Birkholz [Fri, 19 Dec 2014 19:29:29 +0000 (12:29 -0700)]
smp: Accommodate multiple processors.

Keep the threads running on each processor in the current-threads
vector.  Change the running list into a runnable list: the threads
that are runnable but not currently running on a processor.

10 years agosmp: Clobber fluid-let and the (runtime state-space) package.
Matt Birkholz [Wed, 5 Nov 2014 20:27:11 +0000 (13:27 -0700)]
smp: Clobber fluid-let and the (runtime state-space) package.

UNimplement fluid-let using dynamic-wind as a backward compatibility
kludge.  Subsystems still using fluid-let, e.g. LIAR, must not be run
in multiple threads simultaneously.  Fluid-let no longer provides
thread-local storage.

Replace the previously fluid-assigned bindings state-space:local and
(runtime dynamic)bindings with thread slots dynamic-point and
dynamic-environment.  Split the initialization of (runtime thread)
into "low" and "high" procedures.  The "low" procedure is applied
early in the bootstrap to create the initial thread, whose dynamic
state is needed later.  Lose the error handling in wait-for-io; it
runs when there is no current thread, thus no way to bind-condition-
handler.

Replace the uniprocessor-only Hanson/Lamping state-spaces with
Scheme48's multiprocessing-friendly dynamic-points in a new package
(runtime wind).

10 years agoAdd outf_error_line; use it everywhere.
Matt Birkholz [Fri, 19 Dec 2014 17:32:04 +0000 (10:32 -0700)]
Add outf_error_line; use it everywhere.

Use it for brevity.  Later when each outf_ operation involves grabbing
a mutex, use it for efficiency.

10 years agoFix Do_Micro_Error to respect stack direction, and print arguments.
Matt Birkholz [Fri, 19 Dec 2014 17:05:34 +0000 (10:05 -0700)]
Fix Do_Micro_Error to respect stack direction, and print arguments.

10 years agoUse INTERRUPTABLE_EXTENT in OS_pause when !HAVE_SIGSUSPEND.
Matt Birkholz [Fri, 19 Dec 2014 16:56:32 +0000 (09:56 -0700)]
Use INTERRUPTABLE_EXTENT in OS_pause when !HAVE_SIGSUSPEND.

10 years agoJust warn when set-debug-flags! is used on a non-debugging machine.
Matt Birkholz [Fri, 19 Dec 2014 16:54:31 +0000 (09:54 -0700)]
Just warn when set-debug-flags! is used on a non-debugging machine.

10 years agodoc: Clean up doc-config.scm.
Matt Birkholz [Fri, 12 Dec 2014 17:02:35 +0000 (10:02 -0700)]
doc: Clean up doc-config.scm.

10 years agodoc: Configure --disable-* should disable build as well as install.
Matt Birkholz [Fri, 12 Dec 2014 17:01:53 +0000 (10:01 -0700)]
doc: Configure --disable-* should disable build as well as install.

Add a TARGETS variable to collect ENabled targets, like INST_TARGETS.

10 years agoTweak condition variable locking.
Taylor R Campbell [Mon, 17 Nov 2014 06:04:26 +0000 (06:04 +0000)]
Tweak condition variable locking.

- Use WITH-THREAD-MUTEX-LOCKED.
- Use ASSERT-THREAD-MUTEX-OWNED.

No functional changes intended.

10 years agoAllow thread barriers to be named.
Taylor R Campbell [Sun, 16 Nov 2014 20:25:27 +0000 (20:25 +0000)]
Allow thread barriers to be named.

10 years agoShow the condition, not just its report, in derived condition reports.
Taylor R Campbell [Sun, 16 Nov 2014 20:24:42 +0000 (20:24 +0000)]
Show the condition, not just its report, in derived condition reports.

That way you can (debug #@n) it or M-x browse-continuation it.

10 years agoFix timed condition variable waits.
Taylor R Campbell [Sun, 16 Nov 2014 18:53:41 +0000 (18:53 +0000)]
Fix timed condition variable waits.

10 years agoSternly advise against non-debugging use of THREAD-MUTEX-OWNER.
Taylor R Campbell [Sun, 16 Nov 2014 18:53:28 +0000 (18:53 +0000)]
Sternly advise against non-debugging use of THREAD-MUTEX-OWNER.