Factored locking primitives out to their own implementation-dependend

files.  Part of the porting effort to LispWorks.
This commit is contained in:
2000-10-09 21:55:43 +00:00
parent 1072ffaf5a
commit dd8365ec4c
3 changed files with 54 additions and 9 deletions

View File

@ -29,21 +29,14 @@ server needs.")
with `release-io-buffer', to enable it to be recycled. Otherwise it
will just be GC'ed as usual."
(or
#+(and :CMU :MP)
(mp:atomic-pop *io-buffers*)
#-(and :CMU :MP)
(pop *io-buffers*)
(pop-atomically *io-buffers*)
;; No ready-made buffer, so we create a new one
(make-new-buffer)))
(defun release-io-buffer (buffer)
"Return a buffer allocated by `get-io-buffer' to the buffer pool for
re-use."
#+(and :CMU :MP)
(mp:atomic-push buffer *io-buffers*)
#-(and :CMU :MP)
(push buffer *io-buffers*)
(push-atomically buffer *io-buffers*)
t)
(defmacro with-io-buffer ((var) &body body)