Changeset 14539 for release


Ignore:
Timestamp:
Dec 31, 2010, 4:30:09 PM (8 years ago)
Author:
wws
Message:

Merge r14519 (with-{read/write}-lock fix) from trunk

Location:
release/1.5/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • release/1.5/source

  • release/1.5/source/cocoa-ide

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • release/1.5/source/lib/macros.lisp

    r13458 r14539  
    32013201
    32023202
    3203 
    3204 
    3205 
    32063203(defmacro with-read-lock ((lock) &body body)
    32073204  "Wait until a given lock is available for read-only access, then evaluate
    32083205its body with the lock held."
    3209   (let* ((p (gensym)))
     3206  (let* ((locked (gensym))
     3207         (p (gensym)))
    32103208    `(with-lock-context
    3211       (let* ((,p ,lock))
    3212         (unwind-protect
    3213              (progn
    3214                (read-lock-rwlock ,p)
    3215                ,@body)
    3216           (unlock-rwlock ,p))))))
    3217 
     3209       (let* ((,locked (make-lock-acquisition))
     3210              (,p ,lock))
     3211         (declare (dynamic-extent ,locked))
     3212         (unwind-protect
     3213              (progn
     3214                (read-lock-rwlock ,p ,locked)
     3215                ,@body)
     3216           (when (lock-acquisition.status ,locked) (unlock-rwlock ,p)))))))
    32183217
    32193218(defmacro with-write-lock ((lock) &body body)
    32203219  "Wait until the given lock is available for write access, then execute
    32213220its body with the lock held."
    3222   (let* ((p (gensym)))
     3221  (let* ((locked (gensym))
     3222         (p (gensym)))
    32233223    `(with-lock-context
    3224       (let* ((,p ,lock))
    3225       (unwind-protect
    3226            (progn
    3227              (write-lock-rwlock ,p)
    3228              ,@body)
    3229         (unlock-rwlock ,p))))))
    3230 
    3231 
     3224       (let* ((,locked (make-lock-acquisition))
     3225              (,p ,lock))
     3226         (declare (dynamic-extent ,locked))
     3227         (unwind-protect
     3228              (progn
     3229                (write-lock-rwlock ,p ,locked)
     3230                ,@body)
     3231           (when (lock-acquisition.status ,locked) (unlock-rwlock ,p)))))))
    32323232
    32333233(defmacro without-gcing (&body body)
  • release/1.5/source/lisp-kernel

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.