Ignore:
Timestamp:
Jul 27, 2008, 6:35:02 PM (13 years ago)
Author:
gb
Message:

Propagate recent changes from trunk:

l1-aprims.lisp: static value of *WHOSTATE* is "Reset".
l1-io.lisp: use stack-allocated temporary buffer in WRITE-PNAME.
l1-lisp-threads.lisp: in THREAD-ENABLE, default "wait" to 1 day.
l1-processes.lisp: PROCESS-WHOSTATE detects and handles static binding

of *WHOSTATE*. PROCESS-ENABLE waits for 1 day, which is effectively
infinite and avoids word-size issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/1.2/source/level-1/l1-processes.lisp

    r8130 r10220  
    217217  (if (process-exhausted-p p)
    218218    "Exhausted"
    219     (symbol-value-in-process '*whostate* p)))
     219    (let* ((loc nil))
     220    (if (eq p *current-process*)
     221      (setq loc (%tcr-binding-location (%current-tcr) '*whostate*))
     222      (let* ((tcr (process-tcr p)))
     223        (without-interrupts
     224         (unwind-protect
     225              (progn
     226                (%suspend-tcr tcr)
     227                (setq loc (%tcr-binding-location tcr '*whostate*)))
     228           (%resume-tcr tcr)))))
     229    (if loc
     230      (%fixnum-ref loc)
     231      (if (eq p *initial-process*)
     232        "Active"
     233        "Reset")))))
    220234
    221235(defun (setf process-whostate) (new p)
     
    252266
    253267
    254 (defun process-enable (p &optional (wait 1))
     268(defun process-enable (p &optional (wait (* 60 60 24) wait-p))
    255269  "Begin executing the initial function of a specified process."
    256270  (setq p (require-type p 'process))
    257271  (not-in-current-process p 'process-enable)
     272  (when wait-p
     273    (check-type wait (unsigned-byte 32)))
    258274  (unless (car (process-initial-form p))
    259275    (error "Process ~s has not been preset.  Use PROCESS-PRESET to preset the process." p))
Note: See TracChangeset for help on using the changeset viewer.