summaryrefslogtreecommitdiff
path: root/Lisp/internal-utilities.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-02-17 11:20:27 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-02-17 11:20:27 +0100
commit620a94200d9d7a33e41afd77c275599feb259ebd (patch)
tree5b681e73025c590ae5a88697c02e31e58d26e15b /Lisp/internal-utilities.lisp
parentb824aed3edf4f51b6a0fb13370c3abc75bc85206 (diff)
Implement FOREIGN-CLASS-ENSURE-REGISTERED.
darcs-hash:cc3448394e3e337be716275c3e4016a542860fd1
Diffstat (limited to 'Lisp/internal-utilities.lisp')
-rw-r--r--Lisp/internal-utilities.lisp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lisp/internal-utilities.lisp b/Lisp/internal-utilities.lisp
index 87746b9..92b003b 100644
--- a/Lisp/internal-utilities.lisp
+++ b/Lisp/internal-utilities.lisp
@@ -18,26 +18,26 @@
(in-package #:mulk.objective-cl)
+(defvar *global-lock* (cons nil nil))
+
+
(defmacro atomically (&body body)
- ;; FIXME
- `(progn ,@body)
- #+(or)
- `(prog2
- (objcl-acquire-global-lock)
- ,@body
- (objcl-release-global-lock)))
+ `(with-exclusive-access (*global-lock*)
+ ,@body))
(defmacro with-exclusive-access ((&rest objects) &body body)
(etypecase objects
(null `(progn ,@body))
(cons `(with-lock ,(first objects)
- (with-exclusive-access (,(rest objects))
+ (with-exclusive-access ,(rest objects)
,@body)))))
(defmacro with-lock (object &body body)
;; FIXME: Implement LOCK-FOR-OBJECT.
+ `(progn ,@body)
+ #+(or)
(let ((lock (gensym "LOCK")))
`(let ((,lock (lock-for-object ,object)))
(prog2