- Timestamp:
- Nov 18, 2007, 11:56:40 PM (17 years ago)
- File:
-
- 1 edited
-
branches/working-0711/ccl/lib/macros.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/lib/macros.lisp
r7647 r7678 2335 2335 (free-resource ,resource-var ,var)))))) 2336 2336 2337 ;;; Bind per-thread specials which help with lock accounting. 2338 (defmacro with-lock-context (&body body) 2339 `(let* ((*locks-held* *locks-held*) 2340 (*locks-pending* *locks-pending*) 2341 (*lock-conses* *lock-conses*)) 2342 ,@body)) 2343 2337 2344 (defmacro with-lock-grabbed ((lock &optional 2338 2345 (whostate "Lock")) … … 2341 2348 the lock held." 2342 2349 (declare (ignore whostate)) 2343 `(with-recursive-lock (,lock) ,@body)) 2350 `(with-lock-context 2351 (with-recursive-lock (,lock) ,@body))) 2344 2352 2345 2353 (defmacro with-lock-grabbed-maybe ((lock &optional … … 2347 2355 &body body) 2348 2356 (declare (ignore whostate)) 2349 `(with-recursive-lock-maybe (,lock) ,@body)) 2357 `(with-lock-context 2358 (with-recursive-lock-maybe (,lock) ,@body))) 2350 2359 2351 2360 (defmacro with-standard-abort-handling (abort-message &body body) … … 3012 3021 its body with the lock held." 3013 3022 (let* ((p (gensym))) 3014 `(let* ((,p ,lock)) 3015 (unwind-protect 3016 (progn 3017 (read-lock-rwlock ,p) 3018 ,@body) 3019 (unlock-rwlock ,p))))) 3023 `(with-lock-context 3024 (let* ((,p ,lock)) 3025 (unwind-protect 3026 (progn 3027 (read-lock-rwlock ,p) 3028 ,@body) 3029 (unlock-rwlock ,p)))))) 3020 3030 3021 3031 … … 3024 3034 its body with the lock held." 3025 3035 (let* ((p (gensym))) 3026 `(let* ((,p ,lock)) 3027 (unwind-protect 3028 (progn 3029 (write-lock-rwlock ,p) 3030 ,@body) 3031 (unlock-rwlock ,p))))) 3036 `(with-lock-context 3037 (let* ((,p ,lock)) 3038 (unwind-protect 3039 (progn 3040 (write-lock-rwlock ,p) 3041 ,@body) 3042 (unlock-rwlock ,p)))))) 3032 3043 3033 3044
Note:
See TracChangeset
for help on using the changeset viewer.
