Changeset 7675


Ignore:
Timestamp:
Nov 19, 2007, 6:09:25 AM (12 years ago)
Author:
gb
Message:

Start to add stuff for lock-tracking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-0/l0-misc.lisp

    r7624 r7675  
    1616
    1717(in-package "CCL")
     18
     19
     20(defparameter *locks-held* () "per-thread list of held locks")
     21(defparameter *locks-pending* () "per-thread list of locks we're waiting for.")
     22(defparameter *lock-conses* ())
     23
     24;; Cold-load lossage.
     25(setq *lock-conses* (make-list 20))
     26
     27;;; Per-thread consing, for lock-ownership tracking.
     28(defun %lock-cons (x y)
     29  (let* ((cell (prog1 *lock-conses*
     30                 (setq *lock-conses* (cdr *lock-conses*)))))
     31    (if cell
     32      (progn
     33        (rplaca cell x)
     34        (rplacd cell y))
     35      (cons x y))))
     36
    1837
    1938;;; Bootstrapping for futexes
Note: See TracChangeset for help on using the changeset viewer.