Matt Birkholz [Fri, 5 Dec 2014 00:19:42 +0000 (17:19 -0700)]
smp: share: boot.o
Matt Birkholz [Fri, 5 Dec 2014 00:16:21 +0000 (17:16 -0700)]
smp: share: bkpt.o
Matt Birkholz [Fri, 5 Dec 2014 00:12:57 +0000 (17:12 -0700)]
smp: share: avltree.o
Matt Birkholz [Sat, 6 Dec 2014 19:56:10 +0000 (12:56 -0700)]
smp: share: README.txt begins the analysis of microcode state
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.
Matt Birkholz [Sat, 20 Dec 2014 18:50:06 +0000 (11:50 -0700)]
smp: Add mutex LOCK/UNLOCK boilerplate to confshared.h (everywhere).
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.
Matt Birkholz [Wed, 17 Dec 2014 09:12:58 +0000 (02:12 -0700)]
smp: Add copy-select-registry!.
Matt Birkholz [Wed, 17 Dec 2014 08:48:39 +0000 (01:48 -0700)]
smp: Add primitive copy-select-registry.
Matt Birkholz [Sat, 20 Dec 2014 18:13:30 +0000 (11:13 -0700)]
smp: Add SIGALRM distributor.
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.
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.
Matt Birkholz [Sat, 20 Dec 2014 16:05:57 +0000 (09:05 -0700)]
smp: Add smp-wake primitive.
Matt Birkholz [Sat, 20 Dec 2014 15:58:22 +0000 (08:58 -0700)]
smp: Add x86_64 support.
Matt Birkholz [Tue, 25 Nov 2014 15:50:37 +0000 (08:50 -0700)]
smp: unshare: svm1 interpreter's state
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.
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.
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.
Matt Birkholz [Sat, 20 Dec 2014 15:44:05 +0000 (08:44 -0700)]
smp: Serialize the outf functions.
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.
Matt Birkholz [Sat, 20 Dec 2014 15:32:10 +0000 (08:32 -0700)]
smp: Synchronize processors for GC.
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.
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.
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.
Matt Birkholz [Sun, 21 Dec 2014 19:02:38 +0000 (12:02 -0700)]
smp: Serialize access to (runtime thread) internals.
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.
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).
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.
Matt Birkholz [Fri, 19 Dec 2014 17:05:34 +0000 (10:05 -0700)]
Fix Do_Micro_Error to respect stack direction, and print arguments.
Matt Birkholz [Fri, 19 Dec 2014 16:56:32 +0000 (09:56 -0700)]
Use INTERRUPTABLE_EXTENT in OS_pause when !HAVE_SIGSUSPEND.
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.
Matt Birkholz [Fri, 12 Dec 2014 17:02:35 +0000 (10:02 -0700)]
doc: Clean up doc-config.scm.
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.
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.
Taylor R Campbell [Sun, 16 Nov 2014 20:25:27 +0000 (20:25 +0000)]
Allow thread barriers to be named.
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.
Taylor R Campbell [Sun, 16 Nov 2014 18:53:41 +0000 (18:53 +0000)]
Fix timed condition variable waits.
Taylor R Campbell [Sun, 16 Nov 2014 18:53:28 +0000 (18:53 +0000)]
Sternly advise against non-debugging use of THREAD-MUTEX-OWNER.
Taylor R Campbell [Sun, 16 Nov 2014 18:52:58 +0000 (18:52 +0000)]
Remove support for recursion in WITH-THREAD-MUTEX-LOCKED.
Taylor R Campbell [Fri, 14 Nov 2014 04:47:04 +0000 (04:47 +0000)]
Don't let just any event wake THREAD-JOIN.
Taylor R Campbell [Fri, 14 Nov 2014 04:19:05 +0000 (04:19 +0000)]
Sort names in (runtime thread) package.
Taylor R Campbell [Fri, 14 Nov 2014 04:18:27 +0000 (04:18 +0000)]
Rename GUARANTEE-THREAD-MUTEX-OWNED to ASSERT-THREAD-MUTEX-OWNED.
Matt Birkholz [Thu, 13 Nov 2014 22:22:03 +0000 (15:22 -0700)]
Fluidize hook/exit and hook/quit. Add hook/%exit for Edwin.
Replace the fluid-let in src/edwin/intmod.scm with let-fluids. The
fluid-let kludge in SMP worlds causes Edwin to hang when killed.
Matt Birkholz [Thu, 13 Nov 2014 22:25:29 +0000 (15:25 -0700)]
Unfluidize (runtime boot-definitions) internal boot-inits.
Replace the fluid-let with its expansion into a dynamic-wind, which
works only if the bootstrap proceeds in one thread and thus
thread-local values for boot-inits are not needed.
Matt Birkholz [Thu, 13 Nov 2014 22:59:23 +0000 (15:59 -0700)]
runtime/thread-queue.scm: Use a mutex to serialize accesses.
Also, use #f events. The (lambda () unspecific) events accumulate
unnecessarily.
Matt Birkholz [Thu, 13 Nov 2014 23:03:08 +0000 (16:03 -0700)]
svm: Make the trap handlers static.
I won't vouch for any speed improvement. I just noticed all the
others were declared static.
Matt Birkholz [Thu, 13 Nov 2014 23:01:11 +0000 (16:01 -0700)]
etc/usermap: Update my email address.
Matt Birkholz [Wed, 22 Oct 2014 23:12:31 +0000 (16:12 -0700)]
Quiet the last CREF complaint on Unix.
Convert references to compiler global variables into
environment-lookup combinations.
Matt Birkholz [Wed, 22 Oct 2014 23:01:30 +0000 (16:01 -0700)]
Add bindings to edwin/debug.scm; punt browser-evaluator.
Add ansi.scm to (edwin screen console-screen) for unix as well as
dos and nt. This quiets cref's complaint about termcap.scm's
reference to make-ansi-terminal-description.
The browser-evaluator command was never implemented(?).
Matt Birkholz [Wed, 22 Oct 2014 22:58:11 +0000 (15:58 -0700)]
Syntax sf before compiler.
The trivial package model of (scode-optimizer) does not include the
internal bindings needed when analyzing (compiler).
Matt Birkholz [Thu, 23 Oct 2014 07:58:41 +0000 (00:58 -0700)]
Move compile-directory. Punt sf- and compile-directory?.
Sf-directory? and friend appear to have been broken since
directory-processor started expecting output-type to be a thunk.
Moving compile-directory out of sf/butils.scm and into
compiler/base/toplev.scm eliminates free variable references noted by
CREF.
Taylor R Campbell [Thu, 13 Nov 2014 22:59:36 +0000 (22:59 +0000)]
Add thread barrier abstraction.
Taylor R Campbell [Thu, 13 Nov 2014 22:55:16 +0000 (22:55 +0000)]
Add condition variable abstraction.
Taylor R Campbell [Thu, 13 Nov 2014 22:45:03 +0000 (22:45 +0000)]
Add GUARANTEE-THREAD-MUTEX-OWNED.
Taylor R Campbell [Thu, 6 Nov 2014 01:39:15 +0000 (01:39 +0000)]
Inherit the root thread continuation.
Fixes
<http://lists.gnu.org/archive/html/mit-scheme-devel/2012-04/msg00000.html>:
nested CREATE-THREADs sometimes see an unassigned root continuation.
Taylor R Campbell [Tue, 4 Nov 2014 04:29:42 +0000 (04:29 +0000)]
Fix indentation in GET-X-DISPLAY botched by last commit.
Taylor R Campbell [Mon, 3 Nov 2014 20:43:44 +0000 (20:43 +0000)]
Reset Edwin's X display on restore.
It now works to save and restore bands in which you have run Edwin
with X, as long as Edwin is not currently running while you save the
band.
Taylor R Campbell [Mon, 3 Nov 2014 20:43:34 +0000 (20:43 +0000)]
Call dload_finalize_file, not dld_finalize_file. Oops.
Taylor R Campbell [Mon, 3 Nov 2014 20:43:17 +0000 (20:43 +0000)]
Reset dld (.so) handles on restore.
Taylor R Campbell [Tue, 21 Oct 2014 21:09:11 +0000 (21:09 +0000)]
Don't pass `-isysroot -fconstant-cfstrings' if we can't find OS X SDKs.
Matt Birkholz [Sun, 19 Oct 2014 18:40:03 +0000 (11:40 -0700)]
svm: Do fni->bci step in host, not with interpreted compress.
Matt Birkholz [Sun, 19 Oct 2014 18:25:32 +0000 (11:25 -0700)]
tests: Replace : with / so progress notes are not errors to Emacs.
Use - instead of : in timestamps reported by compile-svm.sh too.
Matt Birkholz [Sat, 11 Oct 2014 01:22:02 +0000 (18:22 -0700)]
typo
Matt Birkholz [Fri, 10 Oct 2014 23:57:02 +0000 (16:57 -0700)]
svm: Fix continue_from_trap.
Signal handlers always find an unknown pc when the svm interpreter is
running. This patch extracts the virtual machine's instruction
pointer for classify_pc in the hope that the compiled code block can
be located.
Matt Birkholz [Fri, 10 Oct 2014 23:39:22 +0000 (16:39 -0700)]
i386 flonums: Fix substitution of FLDZ,FUCOMP for FTST in
521ffb3.
The branch instructions needed to be swapped.
This caused compiled generic arithmetic to get e.g. (> x 0.) wrong,
causing an overflow in float->integers when compiling
runtime/arith.scm for the SVM.
Matt Birkholz [Fri, 10 Oct 2014 23:32:01 +0000 (16:32 -0700)]
make check: To avoid long run times, export FAST=y.
A nip and a tuck and the SVM can get through `make check' in 10-15
minutes, instead of MORE THAN 5 HOURS on a Dell Inspiron 1420 (2.2GHz
Core2Duo Centrino with 2GB RAM).
Matt Birkholz [Fri, 5 Sep 2014 00:05:38 +0000 (17:05 -0700)]
mcrypt: A libmcrypt plugin (separately buildable FFI wrapper).
Matt Birkholz [Wed, 27 Aug 2014 05:27:38 +0000 (22:27 -0700)]
microcode/unix: fix continue_from_trap to freak out (force GC) less
The classify_pc function returns pcl_unknown for traps in shared
libraries, e.g. in feraiseexcept (in the raise-float-exceptions
primitive) or any callout (in the c-call primitive). This new
continue_from_trap function is less conservative, ignoring the
pcl_unknown result from classify_pc when the stack_pointer, Free and
PRIMITIVE registers all look good. This eliminated all complaints
during `make check' about "resetting bogus Free" (not the actual
problem), representing 14 unnecessarily forced GCs.
Also, fix the murmur about "resetting bogus Free". Correct it for
accuracy and so that it must be turned on with the
((make-primitive-procedure 'SET-DEBUG-FLAGS! 2) 9 #t)
Matt Birkholz [Wed, 27 Aug 2014 04:59:34 +0000 (21:59 -0700)]
microcode/i386: Set sse_presence.
Matt Birkholz [Wed, 13 Aug 2014 04:03:12 +0000 (21:03 -0700)]
Fluidize (runtime thread) internal root-continuation-default.
Matt Birkholz [Tue, 12 Aug 2014 18:51:23 +0000 (11:51 -0700)]
Fluidize *bound-restarts* and dynamic-handler-frames.
Matt Birkholz [Sat, 8 Feb 2014 20:02:42 +0000 (13:02 -0700)]
Fluidize *random-state*.
Matt Birkholz [Sat, 8 Feb 2014 19:57:21 +0000 (12:57 -0700)]
Fluidize flonum-unparser-cutoff.
Matt Birkholz [Sat, 8 Feb 2014 17:33:26 +0000 (10:33 -0700)]
Fluidize (runtime swank) internal variables *top-level-restart*,...
...*sldb-state*, *index* and *buffer-pstring*.
Matt Birkholz [Sat, 8 Feb 2014 17:32:18 +0000 (10:32 -0700)]
Fluidize (runtime structure-parser) internal variable name-counters.
Matt Birkholz [Sat, 8 Feb 2014 17:29:09 +0000 (10:29 -0700)]
Fluidize (runtime gc-statistics) internal hook/record-statistic!.
Matt Birkholz [Sat, 8 Feb 2014 17:25:07 +0000 (10:25 -0700)]
Fluidize (runtime save/restore) internal *within-restore-window?*.
Matt Birkholz [Fri, 7 Feb 2014 18:20:07 +0000 (11:20 -0700)]
Fluidize (runtime options) internal variables *options*, *parent*.
Matt Birkholz [Fri, 7 Feb 2014 17:57:39 +0000 (10:57 -0700)]
Fluidize (runtime parser) controls: *parser-radix*,...
... *parser-associate-positions?*,
*parser-atom-delimiters*,
*parser-canonicalize-symbols?*,
*parser-constituents*,
*parser-enable-file-attributes-parsing?*,
*parser-keyword-style*,
and *parser-table*.
Matt Birkholz [Fri, 7 Feb 2014 17:55:36 +0000 (10:55 -0700)]
Fluidize (runtime debugger) internals *dstate* and *port*.
Matt Birkholz [Tue, 4 Feb 2014 22:24:52 +0000 (15:24 -0700)]
Fluidize (runtime syntax) internal variable *rename-database*.
Matt Birkholz [Tue, 4 Feb 2014 22:13:09 +0000 (15:13 -0700)]
Fluidize (runtime user-interface) internal *notification-level*.
Matt Birkholz [Tue, 4 Feb 2014 22:10:59 +0000 (15:10 -0700)]
Fluidize (runtime unsyntaxer) internal variable: substitutions.
Matt Birkholz [Tue, 4 Feb 2014 21:09:29 +0000 (14:09 -0700)]
Fluidize (runtime program-copier) internal *copy-constants*?,...
...and *object-copies*.
Matt Birkholz [Tue, 4 Feb 2014 21:07:55 +0000 (14:07 -0700)]
Fluidize (runtime compiler-info) internal directory-rewriting-rules.
Matt Birkholz [Tue, 4 Feb 2014 21:03:45 +0000 (14:03 -0700)]
Fluidize (runtime advice) internal advice-continuation,...
...the-arguments, the-procedure and the-result.
Matt Birkholz [Tue, 4 Feb 2014 21:01:12 +0000 (14:01 -0700)]
Fluidize (runtime pathname) internal library-directory-path.
Matt Birkholz [Tue, 4 Feb 2014 01:21:12 +0000 (18:21 -0700)]
Fluidize (runtime unparser) internal *list-depth*, *output-port*,...
...*slashify?*, *environment* and *dispatch-table*.
Matt Birkholz [Mon, 3 Feb 2014 23:42:59 +0000 (16:42 -0700)]
Fluidize *pp-...*, i.e. *pp-default-as-code?*,...
... *pp-named-lambda->define?*,
*pp-primitives-by-name*,
*pp-uninterned-symbols-by-name*,
*pp-no-highlights?*,
*pp-save-vertical-space?*,
*pp-lists-as-tables?*,
*pp-forced-x-size*,
*pp-avoid-circularity?*,
*pp-auto-highlighter*, and
*pp-arity-dispatched-procedure-style*.
Matt Birkholz [Mon, 3 Feb 2014 23:40:41 +0000 (16:40 -0700)]
Fluidize (runtime pretty-printer) x-size, code-dispatch-list,...
...output-port, dispatch-list, dispatch-default.
Matt Birkholz [Mon, 3 Feb 2014 18:58:01 +0000 (11:58 -0700)]
Fluidize (runtime unparser) *default-unparser-state*.
Matt Birkholz [Mon, 3 Feb 2014 16:19:45 +0000 (09:19 -0700)]
Fluidize (runtime directory) variable *expand-directory-prefixes?*.
Matt Birkholz [Sun, 2 Feb 2014 23:45:52 +0000 (16:45 -0700)]
Fluidize (runtime error-handler) internal variables: i.e. ...
...static-handler-frames and break-on-signals-types.
Matt Birkholz [Sun, 2 Feb 2014 21:39:38 +0000 (14:39 -0700)]
Fluidize *unparse...*, i.e. *unparser-table*, *unparser-radix*...
... *unparse-abbreviate-quotations?*,
*unparse-compound-procedure-names?*,
*unparse-primitives-by-name?*,
*unparse-uninterned-symbols-by-name?*,
*unparse-with-datum?*,
*unparse-with-maximum-readability?*,
*unparser-list-breadth-limit*,
*unparser-list-depth-limit*, and
*unparser-string-length-limit*.
Matt Birkholz [Sun, 2 Feb 2014 21:34:55 +0000 (14:34 -0700)]
Fluidize *default-pathname-defaults*.
Matt Birkholz [Sat, 1 Feb 2014 05:47:42 +0000 (22:47 -0700)]
Fluidize standard-error-hook, standard-warning-hook and...
...standard-breakpoint-hook. These are exported to () so... apologies
in advance.
Matt Birkholz [Sat, 1 Feb 2014 05:37:43 +0000 (22:37 -0700)]
Fluidize *nearest-cmdl*.
Matt Birkholz [Tue, 12 Aug 2014 00:25:58 +0000 (17:25 -0700)]
Fluidize (runtime load) exported variables: i.e. load/loading?...
and load/suppress-loading-message?. Punted old load-noisily?.
Matt Birkholz [Mon, 11 Aug 2014 22:33:35 +0000 (15:33 -0700)]
Fluidize (runtime load) internal variables: *eval-unit*,...
*current-load-environment*, *write-notifications?*, *load-init-file?*
and load/after-load-hooks.
Matt Birkholz [Mon, 11 Aug 2014 22:30:07 +0000 (15:30 -0700)]
Fluidize *working-directory-pathname*.