Changeset 15155 for trunk/source/level-1/l1-processes.lisp
- Timestamp:
- Dec 24, 2011, 1:11:50 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-1/l1-processes.lisp
r15141 r15155 140 140 (dribble-saved-terminal-io :initform nil) 141 141 (result :initform (cons nil nil) 142 :reader process-result)) 142 :reader process-result) 143 (whostate-cell :initform (list "Reset") 144 :reader process-whostate-cell)) 143 145 (:primary-p t)) 144 146 … … 228 230 (defun process-whostate (p) 229 231 "Return a string which describes the status of a specified process." 230 (let* ((ip *initial-process*)) 231 (cond ((eq p *current-process*) 232 (if (%tcr-binding-location (%current-tcr) '*whostate*) 233 *whostate* 234 (if (eq p ip) 235 "Active" 236 "Reset"))) 237 (t 238 (without-interrupts 239 (with-lock-grabbed (*kernel-exception-lock*) 240 (with-lock-grabbed (*kernel-tcr-area-lock*) 241 (let* ((tcr (process-tcr p))) 242 (if tcr 243 (unwind-protect 244 (let* ((loc nil)) 245 (%suspend-tcr tcr) 246 (setq loc (%tcr-binding-location tcr '*whostate*)) 247 (if loc 248 (%fixnum-ref loc) 249 (if (eq p ip) 250 "Active" 251 "Reset"))) 252 (%resume-tcr tcr)) 253 "Exhausted"))))))))) 232 (car (process-whostate-cell p))) 254 233 255 234 (defun (setf process-whostate) (new p) 256 (unless (process-exhausted-p p) 257 (setf (symbol-value-in-process '*whostate* p) new))) 235 (setf (car (process-whostate-cell p)) new)) 258 236 259 237 … … 379 357 (add-to-all-processes process) 380 358 (with-initial-bindings (process-initial-bindings process) 381 ( setq *whostate*"Active")382 (run-process-initial-form process initial-form))))359 (with-process-whostate ("Active") 360 (run-process-initial-form process initial-form))))) 383 361 process 384 362 initial-form) … … 419 397 (if (eq kill :shutdown) 420 398 (progn 421 (set q *whostate*"Shutdown")399 (setf (car (process-whostate-cell process)) "Shutdown") 422 400 (add-to-shutdown-processes process))) 423 401 (let* ((semaphore (process-termination-semaphore process)))
Note: See TracChangeset
for help on using the changeset viewer.