Factored locking primitives out to their own implementation-dependend
files. Part of the porting effort to LispWorks.
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user