source: trunk/source/level-1/l1-processes.lisp @ 10212

Last change on this file since 10212 was 10212, checked in by gb, 11 years ago

Hair up PROCESS-WHOSTATE, mostly so that we an handle the case
where there's no dynamic binding of *WHOSTATE* and special
case the initial process.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 23.6 KB
Line 
1;;;-*- Mode: Lisp; Package: CCL -*-
2;;;
3;;;   Copyright (C) 1994-2001 Digitool, Inc
4;;;   This file is part of OpenMCL. 
5;;;
6;;;   OpenMCL is licensed under the terms of the Lisp Lesser GNU Public
7;;;   License , known as the LLGPL and distributed with OpenMCL as the
8;;;   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
9;;;   which is distributed with OpenMCL as the file "LGPL".  Where these
10;;;   conflict, the preamble takes precedence. 
11;;;
12;;;   OpenMCL is referenced in the preamble as the "LIBRARY."
13;;;
14;;;   The LLGPL is also available online at
15;;;   http://opensource.franz.com/preamble.html
16
17
18;; L1-processes.lisp
19
20(cl:in-package "CCL")
21
22
23(let* ((all-processes ())
24       (shutdown-processes ())
25       (all-processes-lock (make-lock)))
26  (defun add-to-all-processes (p)
27    (with-lock-grabbed (all-processes-lock)
28      (pushnew p all-processes :test #'eq)
29      p))
30  (defun remove-from-all-processes (p)
31    (with-lock-grabbed (all-processes-lock)
32      (setq all-processes (delete p all-processes))
33      t))
34  (defun all-processes ()
35    "Obtain a fresh list of all known Lisp threads."
36    (with-lock-grabbed (all-processes-lock)
37      (copy-list all-processes)))
38  (defun shutdown-processes ()
39    (with-lock-grabbed (all-processes-lock)
40      (copy-list shutdown-processes)))
41  (defun %clear-shutdown-proceses ()
42    (setq shutdown-processes nil))
43  (defun add-to-shutdown-processes (p)
44    (with-lock-grabbed (all-processes-lock)
45      (pushnew p shutdown-processes :test #'eq))
46    t)
47  (defun pop-shutdown-processes ()
48    (with-lock-grabbed (all-processes-lock)
49      (pop shutdown-processes)))
50  (defun find-process (id)
51    (etypecase id
52      (process id)
53      (integer (with-lock-grabbed (all-processes-lock)
54                 (find id all-processes
55                       :key #'(lambda (p)
56                                (process-serial-number p)))))
57      (string (with-lock-grabbed (all-processes-lock)
58                (find id all-processes
59                      :key #'(lambda (p)
60                               (process-name p))
61                      :test #'equal))))))
62
63
64
65(defun not-in-current-process (p operation)
66  (if (eq p *current-process*)
67    (error "The current process (~s) can't perform the ~a operation on itself."
68           p operation)))
69
70(defun startup-shutdown-processes ()
71  (let* ((p))
72    (loop
73      (unless (setq p (pop-shutdown-processes)) (return))
74      (new-tcr-for-thread (process-thread p))
75      (%process-preset-internal p)
76      (process-enable p)
77      )))
78
79;;; Done with a queue-fixup so that it will be the last thing
80;;; that happens on startup.
81(queue-fixup
82 (pushnew 'startup-shutdown-processes *lisp-system-pointer-functions*))
83
84
85
86
87
88
89
90(defun wrap-initial-bindings (alist)
91  (mapcar #'(lambda (pair)
92              (destructuring-bind (symbol . valform) pair
93                (cons (require-type symbol 'symbol)
94                      (cond ((symbolp valform)
95                             (constantly (symbol-value valform)))
96                            ((typep valform 'function) valform)
97                            ((consp valform)
98                             (if (eq (car valform) 'quote)
99                               (constantly (cadr valform))
100                               #'(lambda () (apply (car valform) (cdr valform)))))
101                            (t
102                             (constantly valform))))))
103          alist))
104
105
106(defun valid-allocation-quantum-p (x)
107  (and (>= x *host-page-size*)
108       (<= x (default-allocation-quantum))
109       (= (logcount x) 1)))
110
111 
112(let* ((psn -1))
113  (defun %new-psn () (incf psn)))
114
115(defclass process ()
116    ((name :initform nil :initarg :name :accessor process-name)
117     (thread :initarg :thread :accessor process-thread)
118     (initial-form :initform (cons nil nil) :reader process-initial-form)
119     (priority :initform 0 :initarg :priority :accessor process-priority)
120     (persistent :initform nil :initarg :persistent :reader process-persistent)
121     (splice :initform (cons nil nil) :accessor process-splice)
122     (initial-bindings :initform nil :initarg :initial-bindings
123                       :accessor process-initial-bindings)
124     (serial-number :initform (%new-psn) :accessor process-serial-number)
125     (creation-time :initform (get-tick-count) :reader process-creation-time)
126     (total-run-time :initform nil :accessor %process-total-run-time)
127     (ui-object :initform (application-ui-object *application*)
128                :accessor process-ui-object)
129     (termination-semaphore :initform nil
130                            :initarg :termination-semaphore
131                            :accessor process-termination-semaphore
132                            :type (or null semaphore))
133     (allocation-quantum :initform (default-allocation-quantum)
134                         :initarg :allocation-quantum
135                         :reader process-allocation-quantum
136                         :type (satisfies valid-allocation-quantum-p))
137     (dribble-stream :initform nil)
138     (dribble-saved-terminal-io :initform nil)
139     (result :initform (cons nil nil)
140             :reader process-result))
141  (:primary-p t))
142
143(defmethod print-object ((p process) s)
144  (print-unreadable-object (p s :type t :identity t)
145    (format s "~a(~d) [~a]" (process-name p)
146            (process-serial-number p)(process-whostate p))))
147
148(defvar *process-class* (find-class 'process))
149
150(defun processp (p)
151  (memq *process-class* (class-precedence-list (class-of p))))
152
153(set-type-predicate 'process 'processp)
154
155(defun make-process (name &key 
156                          thread
157                          persistent
158                          (priority 0)
159                          (stack-size *default-control-stack-size*)
160                          (vstack-size *default-value-stack-size*)
161                          (tstack-size *default-temp-stack-size*)
162                          (initial-bindings ())
163                          (use-standard-initial-bindings t)
164                          (class (find-class 'process))
165                          (termination-semaphore ())
166                          (allocation-quantum (default-allocation-quantum)))
167  "Create and return a new process."
168  (let* ((p (make-instance
169             class
170             :name name
171             :thread (or thread
172                         (new-thread name stack-size  vstack-size  tstack-size))
173             :priority priority
174             :persistent persistent
175             :initial-bindings (append (if use-standard-initial-bindings
176                                         (standard-initial-bindings))
177                                       (wrap-initial-bindings
178                                        initial-bindings))
179             :termination-semaphore (or termination-semaphore
180                                        (make-semaphore))
181             :allocation-quantum allocation-quantum)))
182    (add-to-all-processes p)
183    (setf (car (process-splice p)) p)
184    p))
185
186
187(defstatic *initial-process*
188    (let* ((p (make-process
189               "Initial"
190               :thread *initial-lisp-thread*
191               :priority 0)))
192      p))
193
194
195(defvar *current-process* *initial-process*
196  "Bound in each process, to that process itself.")
197
198(defstatic *interactive-abort-process* *initial-process*)
199
200
201
202
203(defun process-tcr (p)
204  (lisp-thread.tcr (process-thread p)))
205
206
207
208(defun process-exhausted-p (p)
209  (let* ((thread (process-thread p)))
210    (or (null thread)
211        (thread-exhausted-p thread))))
212 
213
214(defun process-whostate (p)
215  "Return a string which describes the status of a specified process."
216  (if (process-exhausted-p p)
217    "Exhausted"
218    (let* ((loc nil))
219    (if (eq p *current-process*)
220      (setq loc (%tcr-binding-location (%current-tcr) '*whostate*))
221      (let* ((tcr (process-tcr p)))
222        (without-interrupts
223         (unwind-protect
224              (progn
225                (%suspend-tcr tcr)
226                (setq loc (%tcr-binding-location tcr '*whostate*)))
227           (%resume-tcr tcr)))))
228    (if loc
229      (%fixnum-ref loc)
230      (if (eq p *initial-process*)
231        "Active"
232        "Reset")))))
233
234(defun (setf process-whostate) (new p)
235  (unless (process-exhausted-p p)
236    (setf (symbol-value-in-process '*whostate* p) new)))
237
238
239
240(defun process-total-run-time (p)
241  (or (%process-total-run-time p)
242      (thread-total-run-time (process-thread p))))
243
244
245
246
247(defun initial-bindings (alist)
248  (let* ((symbols ())
249         (values ()))
250    (dolist (a alist (values (nreverse symbols) (nreverse values)))
251      (push (car a) symbols)
252      (push (funcall (cdr a)) values))))
253
254
255                           
256(defun symbol-value-in-process (sym process)
257  (if (eq process *current-process*)
258    (symbol-value sym)
259    (symbol-value-in-tcr sym (process-tcr process))))
260
261(defun (setf symbol-value-in-process) (value sym process)
262  (if (eq process *current-process*)
263    (setf (symbol-value sym) value)
264    (setf (symbol-value-in-tcr sym (process-tcr process)) value)))
265
266
267(defun process-enable (p &optional (wait (* 60 60 24)))
268  "Begin executing the initial function of a specified process."
269  (setq p (require-type p 'process))
270  (not-in-current-process p 'process-enable)
271  (unless (car (process-initial-form p))
272    (error "Process ~s has not been preset.  Use PROCESS-PRESET to preset the process." p))
273  (let* ((thread (process-thread p)))
274    (do* ((total-wait wait (+ total-wait (or wait 0))))
275         ((thread-enable thread (process-termination-semaphore p) (1- (integer-length (process-allocation-quantum p)))  wait)
276          p)
277      (cerror "Keep trying."
278              "Unable to enable process ~s; have been trying for ~s seconds."
279              p total-wait))))
280
281
282(defmethod (setf process-termination-semaphore) :after (new (p process))
283  (with-macptrs (tcrp)
284    (%setf-macptr-to-object tcrp (process-tcr p))
285    (unless (%null-ptr-p tcrp)
286      (setf (%get-ptr tcrp target::tcr.termination-semaphore)
287            (if new
288              (semaphore-value new)
289              (%null-ptr))))
290    new))
291
292(defun process-resume (p)
293  "Resume a specified process which had previously been suspended
294by process-suspend."
295  (setq p (require-type p 'process))
296  (%resume-tcr (process-tcr p)))
297
298(defun process-suspend (p)
299  "Suspend a specified process."
300  (setq p (require-type p 'process))
301  (if (eq p *current-process*)
302    (error "Suspending the current process can't work.  ~&(If the documentation claims otherwise, it's incorrect.)")
303    (%suspend-tcr (process-tcr p))))
304
305(defun process-suspend-count (p)
306  "Return the number of currently-pending suspensions applicable to
307a given process."
308  (setq p (require-type p 'process))
309  (let* ((thread (process-thread p)))
310    (if thread
311      (lisp-thread-suspend-count thread))))
312
313(defun process-active-p (p)
314  (setq p (require-type p 'process))
315  (and (eql 0 (process-suspend-count p))
316       (not (process-exhausted-p p))))
317 
318;;; Used by process-run-function
319(defun process-preset (process function &rest args)
320  "Set the initial function and arguments of a specified process."
321  (let* ((p (require-type process 'process))
322         (f (require-type function 'function))
323         (initial-form (process-initial-form p)))
324    (declare (type cons initial-form))
325    (not-in-current-process p 'process-preset)
326    ; Not quite right ...
327    (rplaca initial-form f)
328    (rplacd initial-form args)
329    (%process-preset-internal process)))
330
331(defun %process-preset-internal (process)
332   (let* ((initial-form (process-initial-form process))
333         (thread (process-thread process)))
334     (declare (type cons initial-form))
335     (thread-preset
336      thread
337      #'(lambda (process initial-form)
338          (let* ((*current-process* process))
339            (add-to-all-processes process)
340            (multiple-value-bind (syms values)
341                (initial-bindings (process-initial-bindings process))
342              (progv syms values
343                (setq *whostate* "Active")
344                (run-process-initial-form process initial-form)))))
345      process
346      initial-form)
347     process))
348
349
350(defun run-process-initial-form (process initial-form)
351  (let* ((exited nil)
352         (kill (handler-case
353                   (restart-case
354                    (let ((values
355                           (multiple-value-list
356                            (apply (car initial-form)
357                                   (cdr (the list initial-form)))))
358                          (result (process-result process)))
359                      (setf (cdr result) values
360                            (car result) t)
361                      (setq exited t)
362                      nil)
363                    (abort-break () :report "Reset this process")
364                    (abort () :report "Kill this process" (setq exited t)))
365                 (process-reset (condition)
366                   (process-reset-kill condition)))))
367    ;; We either exited from the initial form normally, were told to
368    ;; exit prematurely, or are being reset and should enter the
369    ;; "awaiting preset" state.
370    (if (or kill exited) 
371      (unless (eq kill :toplevel)
372        (process-initial-form-exited process (or kill t)))
373      (progn
374        (thread-change-state (process-thread process) :run :reset)
375        (tcr-set-preset-state (process-tcr process))))
376    nil))
377
378;;; Separated from run-process-initial-form just so I can change it easily.
379(defun process-initial-form-exited (process kill)
380  ;; Enter the *initial-process* and have it finish us up
381  (without-interrupts
382   (if (eq kill :shutdown)
383     (progn
384       (setq *whostate* "Shutdown")
385       (add-to-shutdown-processes process)))
386   (maybe-finish-process-kill process kill)))
387
388(defun maybe-finish-process-kill (process kill)
389  (when (and kill (neq kill :shutdown))
390    (setf (process-whostate process) "Dead")
391    (remove-from-all-processes process)
392    (let ((thread (process-thread process)))
393      (unless (or (eq thread *current-lisp-thread*)
394                  (thread-exhausted-p thread))
395        (kill-lisp-thread thread))))
396  nil)
397
398
399 
400
401(defun require-global-symbol (s &optional env)
402  (let* ((s (require-type s 'symbol))
403         (bits (%symbol-bits s)))
404    (unless (or (logbitp $sym_vbit_global bits)
405                (let* ((defenv (if env (definition-environment env))))
406                  (if defenv
407                    (eq :global (%cdr (assq s (defenv.specials defenv)))))))
408      (error "~s not defined with ~s" s 'defstatic))
409    s))
410
411
412(defmethod print-object ((s lock) stream)
413  (print-unreadable-object (s stream :type t :identity t)
414    (let* ((val (uvref s target::lock._value-cell))
415           (name (uvref s target::lock.name-cell)))
416      (when name
417        (format stream "~s " name))
418      (if (typep val 'macptr)
419        (format stream "[ptr @ #x~x]"
420                (%ptr-to-int val))))))
421
422(defun lockp (l)
423  (eq target::subtag-lock (typecode l)))
424
425(set-type-predicate 'lock 'lockp)
426
427(defun recursive-lock-p (l)
428  (and (eq target::subtag-lock (typecode l))
429       (eq 'recursive-lock (%svref l target::lock.kind-cell))))
430
431(defun read-write-lock-p (l)
432  (and (eq target::subtag-lock (typecode l))
433       (eq 'read-write-lock (%svref l target::lock.kind-cell))))
434
435(setf (type-predicate 'recursive-lock) 'recursive-lock-p
436      (type-predicate 'read-write-lock) 'read-write-lock-p)
437
438
439(defun grab-lock (lock &optional flag)
440  "Wait until a given lock can be obtained, then obtain it."
441  (%lock-recursive-lock-object lock flag))
442
443(defun release-lock (lock)
444  "Relinquish ownership of a given lock."
445  (%unlock-recursive-lock-object lock))
446
447(defun try-lock (lock &optional flag)
448  "Obtain the given lock, but only if it is not necessary to wait for it."
449  (%try-recursive-lock-object lock flag))
450
451(defun lock-acquisition-status (thing)
452  (if (istruct-typep thing 'lock-acquisition)
453    (lock-acquisition.status thing)
454    (report-bad-arg thing 'lock-acquisition)))
455
456(defun clear-lock-acquisition-status (thing)
457  (if (istruct-typep thing 'lock-acquisition)
458    (setf (lock-acquisition.status thing) nil)
459    (report-bad-arg thing 'lock-acquisition)))
460
461(defmethod print-object ((l lock-acquisition) stream)
462  (print-unreadable-object (l stream :type t :identity t)
463    (format stream "[status = ~s]" (lock-acquisition-status l))))
464
465(defun semaphore-notification-status (thing)
466  (if (istruct-typep thing 'semaphore-notification)
467    (semaphore-notification.status thing)
468    (report-bad-arg thing 'semaphore-notification)))
469
470(defun clear-semaphore-notification-status (thing)
471  (if (istruct-typep thing 'semaphore-notification)
472    (setf (semaphore-notification.status thing) nil)
473    (report-bad-arg thing 'semaphore-notification)))
474
475(defmethod print-object ((l semaphore-notification) stream)
476  (print-unreadable-object (l stream :type t :identity t)
477    (format stream "[status = ~s]" (semaphore-notification-status l))))
478
479(defun process-wait (whostate function &rest args)
480  "Causes the current lisp process (thread) to wait for a given
481predicate to return true."
482  (declare (dynamic-extent args))
483  (or (apply function args)
484      (with-process-whostate (whostate)
485        (loop
486          (when (apply function args)
487            (return))
488          ;; Sleep for a tick
489          (%nanosleep 0 *ns-per-tick*)))))
490
491
492
493(defun process-wait-with-timeout (whostate time function &rest args)
494  "Cause the current thread to wait for a given predicate to return true,
495or for a timeout to expire."
496  (declare (dynamic-extent args))
497  (cond ((null time)  (apply #'process-wait whostate function args) t)
498        (t (let* ((win nil)
499                  (when (+ (get-tick-count) time))
500                  (f #'(lambda () (let ((val (apply function args)))
501                                    (if val
502                                      (setq win val)
503                                      (> (get-tick-count) when))))))
504             (declare (dynamic-extent f))
505             (process-wait whostate f)
506             win))))
507
508
509(defmethod process-interrupt ((process process) function &rest args)
510  "Arrange for the target process to invoke a specified function at
511some point in the near future, and then return to what it was doing."
512  (let* ((p (require-type process 'process)))
513    (if (eq p *current-process*)
514      (progn
515        (apply function args)
516        t)
517      (thread-interrupt
518       (process-thread p)
519       process
520       #'apply
521       function args))))
522
523(defmethod process-debug-condition ((p process) condition frame-pointer)
524  (declare (ignore condition frame-pointer)))
525
526
527
528
529;;; This one is in the Symbolics documentation
530(defun process-allow-schedule ()
531  "Used for cooperative multitasking; probably never necessary."
532  (yield))
533
534
535;;; something unique that users won't get their hands on
536(defun process-reset-tag (process)
537  (process-splice process))
538
539(defun process-run-function (name-or-keywords function &rest args)
540  "Create a process, preset it, and enable it."
541  (if (listp name-or-keywords)
542    (%process-run-function name-or-keywords function args)
543    (let ((keywords (list :name name-or-keywords)))
544      (declare (dynamic-extent keywords))
545      (%process-run-function keywords function args))))
546
547(defun %process-run-function (keywords function args)
548  (destructuring-bind (&key (name "Anonymous")
549                            (priority  0)
550                            (stack-size *default-control-stack-size*)
551                            (vstack-size *default-value-stack-size*)
552                            (tstack-size *default-temp-stack-size*)
553                            (initial-bindings ())
554                            (persistent nil)
555                            (use-standard-initial-bindings t)
556                            (termination-semaphore nil)
557                            (allocation-quantum (default-allocation-quantum)))
558                      keywords
559    (setq priority (require-type priority 'fixnum))
560    (let* ((process (make-process name
561                                  :priority priority
562                                  :stack-size stack-size
563                                  :vstack-size vstack-size
564                                  :tstack-size tstack-size
565                                  :persistent persistent
566                                  :use-standard-initial-bindings use-standard-initial-bindings
567                                  :initial-bindings initial-bindings
568                                  :termination-semaphore termination-semaphore
569                                  :allocation-quantum allocation-quantum)))
570      (process-preset process #'(lambda () (apply function args)))
571      (process-enable process)
572      process)))
573
574(defmethod process-reset ((process process) &optional kill)
575  "Cause a specified process to cleanly exit from any ongoing computation."
576  (setq process (require-type process 'process))
577  (unless (memq kill '(nil :kill :shutdown))
578    (setq kill (require-type kill '(member nil :kill :shutdown))))
579  (if (eq process *current-process*)
580    (%process-reset kill)
581    (if (process-exhausted-p process)
582      (maybe-finish-process-kill process kill)
583      (progn
584        (process-interrupt process '%process-reset kill)))))
585
586
587(defun %process-reset (kill)
588  (signal 'process-reset :kill kill)
589  (maybe-finish-process-kill *current-process* kill))
590
591;;; By default, it's just fine with the current process
592;;; if the application/user wants to quit.
593(defmethod process-verify-quit ((process process))
594  t)
595
596(defmethod process-exit-application ((process process) thunk)
597  (when (eq process *initial-process*)
598    (prepare-to-quit)
599    (%set-toplevel thunk)
600    (fresh-line *stdout*)
601    (finish-output *stdout*)
602    (toplevel)))
603
604
605
606(defmethod process-kill ((process process))
607  "Cause a specified process to cleanly exit from any ongoing
608computation, and then exit."
609  (and (process-interrupt process #'%process-reset :kill)
610       (setf (process-kill-issued process) t)))
611
612(defun process-abort (process &optional condition)
613  "Cause a specified process to process an abort condition, as if it
614had invoked abort."
615  (process-interrupt process
616                     #'(lambda ()
617                         (abort condition))))
618
619(defmethod process-reset-and-enable ((process process))
620  (not-in-current-process process 'process-reset-and-enable)
621  (process-reset process)
622  (process-enable process))
623
624(defmethod process-kill-issued ((process process))
625  (cdr (process-splice process)))
626
627(defmethod (setf process-kill-issued) (val (process process))
628  (setf (cdr (process-splice process)) val))
629
630(defun tcr->process (tcr)
631  (dolist (p (all-processes))
632    (when (eq tcr (process-tcr p))
633      (return p))))
634
635(defun current-process-allocation-quantum ()
636  (process-allocation-quantum *current-process*))
637
638(defun (setf current-process-allocation-quantum) (new)
639  (if (valid-allocation-quantum-p new)
640    (with-macptrs (tcrp)
641      (%setf-macptr-to-object tcrp (%current-tcr))
642      (setf (slot-value *current-process* 'allocation-quantum) new
643            (%get-natural tcrp target::tcr.log2-allocation-quantum)
644            (1- (integer-length new)))
645      new)
646    (report-bad-arg new '(satisfies valid-allocation-quantum-p))))
647
648
649(def-standard-initial-binding *backtrace-contexts* nil)
650
651(defmethod exit-interactive-process ((p process))
652  (unless (eq p *initial-process*)
653    (when (eq p *current-process*)
654      (process-kill p))))
655
656(defclass tty-listener (process)
657    ())
658
659(defmethod exit-interactive-process ((p tty-listener))
660  (when (eq p *current-process*)
661    (quit)))
662
663(defmethod process-stop-dribbling ((p process))
664  (with-slots (dribble-stream dribble-saved-terminal-io) p
665    (when dribble-stream
666      (close dribble-stream)
667      (setq dribble-stream nil))
668    (when dribble-saved-terminal-io
669      (setq *terminal-io* dribble-saved-terminal-io
670            dribble-saved-terminal-io nil))))
671
672(defmethod process-dribble ((p process) path)
673  (with-slots (dribble-stream dribble-saved-terminal-io) p
674    (process-stop-dribbling p)
675    (when path
676      (let* ((in (two-way-stream-input-stream *terminal-io*))
677             (out (two-way-stream-output-stream *terminal-io*))
678             (f (open path :direction :output :if-exists :append 
679                      :if-does-not-exist :create)))
680        (without-interrupts
681         (setq dribble-stream f
682               dribble-saved-terminal-io *terminal-io*
683               *terminal-io* (make-echoing-two-way-stream
684                              (make-echo-stream in f)
685                              (make-broadcast-stream out f)))))
686      path)))
687
688(defmethod join-process ((p process) &key (default nil defaultp))
689  (wait-on-semaphore (process-termination-semaphore p) nil "join-process")
690  (let ((result (process-result p)))
691    (cond ((car result) (values-list (cdr result)))
692          (defaultp default)
693          (t (error "Failed to join ~s" p)))))
694
695
696(defmethod process-locks-held ((p process))
697  #+lock-accounting
698  (copy-list (symbol-value-in-process '*locks-held* p)))
699
700(defmethod process-locks-pending ((p process))
701  #+lock-accounting
702  (copy-list (symbol-value-in-process '*locks-pending* p)))
Note: See TracBrowser for help on using the repository browser.