Ignore:
Timestamp:
Jul 30, 2008, 10:48:42 PM (11 years ago)
Author:
gb
Message:

Saner handling of WAIT arg in PROCESS-ENABLE, as per 1.2.

File:
1 edited

Legend:

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

    r10212 r10253  
    265265
    266266
    267 (defun process-enable (p &optional (wait (* 60 60 24)))
     267(defun process-enable (p &optional (wait (* 60 60 24) wait-p))
    268268  "Begin executing the initial function of a specified process."
    269269  (setq p (require-type p 'process))
    270270  (not-in-current-process p 'process-enable)
     271  (when wait-p
     272    (check-type wait (unsigned-byte 32)))
    271273  (unless (car (process-initial-form p))
    272274    (error "Process ~s has not been preset.  Use PROCESS-PRESET to preset the process." p))
    273275  (let* ((thread (process-thread p)))
    274     (do* ((total-wait wait (+ total-wait (or wait 0))))
     276    (do* ((total-wait wait (+ total-wait wait)))
    275277         ((thread-enable thread (process-termination-semaphore p) (1- (integer-length (process-allocation-quantum p)))  wait)
    276278          p)
Note: See TracChangeset for help on using the changeset viewer.