(declare (usual-integrations))
\f
(define (initialize-package!)
- (set! population-of-1d-tables (make-population/unsafe))
- (add-secondary-gc-daemon! gc-1d-tables!))
+ (set! population-of-1d-tables (make-serial-population/unsafe))
+ (add-secondary-gc-daemon! clean-1d-tables!))
(define (initialize-unparser!)
(unparser/set-tagged-pair-method! 1d-table-tag
(define population-of-1d-tables)
-(define (gc-1d-tables!)
- (map-over-population! population-of-1d-tables 1d-table/clean!))
+(define (clean-1d-tables!)
+ (for-each-inhabitant population-of-1d-tables 1d-table/clean!))
(define (make-1d-table)
+ (let ((table (list 1d-table-tag)))
+ (add-to-population! population-of-1d-tables table)
+ table))
+
+(define (make-1d-table/unsafe)
(let ((table (list 1d-table-tag)))
(add-to-population!/unsafe population-of-1d-tables table)
table))
1d-table?
make-1d-table)
(import (runtime population)
- make-population/unsafe
+ make-serial-population/unsafe
add-to-population!/unsafe)
(initialization (initialize-package!)))
(import (runtime population)
add-to-population!/unsafe
make-population/unsafe)
+ (import (runtime 1d-property)
+ make-1d-table/unsafe)
(export (runtime interrupt-handler)
thread-timer-interrupt-handler)
(export (runtime primitive-io)
(define enable-smp? #f)
\f
(define-structure (thread
- (constructor %make-thread ())
+ (constructor %make-thread (properties))
(conc-name thread/))
(execution-state 'RUNNING)
;; One of:
;; List of mutexes that this thread owns or is waiting to own. Used
;; to disassociate the thread from those mutexes when it is exited.
- (properties (make-1d-table) read-only #t))
+ (properties #f read-only #t))
(define-integrable (guarantee-thread thread procedure)
(if (not (thread? thread))
(set! timer-records #f)
(set! timer-interval 100)
(reset-threads-low!)
- (let ((first (%make-thread)))
+ (let ((first (%make-thread (make-1d-table/unsafe))))
(set-thread/exit-value! first detached-thread-marker)
(set-thread/root-state-point! first
(current-state-point state-space:local))
unspecific)
(define (make-thread continuation)
- (let ((thread (%make-thread)))
+ (let ((thread (%make-thread (make-1d-table))))
(set-thread/continuation! thread continuation)
(set-thread/root-state-point! thread
(current-state-point state-space:local))