From 07452ec5e26e0c4cc3cc8c4591e1c99bc121b6ff Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Sun, 20 Jul 2008 15:04:17 +0200 Subject: [PATCH] Style changes. Signed-off-by: Stelian Ionescu --- io.streams/zeta/buffer.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/io.streams/zeta/buffer.lisp b/io.streams/zeta/buffer.lisp index f65d6c4..f5217b0 100644 --- a/io.streams/zeta/buffer.lisp +++ b/io.streams/zeta/buffer.lisp @@ -10,7 +10,7 @@ ;;;----------------------------------------------------------------------------- (defclass buffer () - ((synchronized :initarg :synchronized :reader buffer-synchronized-p) + ((synchronized :initarg :synchronized :reader synchronizedp) (input-iobuf :initarg :input-buffer :accessor input-iobuf-of) (output-iobuf :initarg :output-buffer :accessor output-iobuf-of)) (:default-initargs :synchronized nil)) @@ -53,7 +53,7 @@ (defmacro with-synchronized-single-channel-buffer ((buffer) &body body) (with-gensyms (body-fun) `(flet ((,body-fun () ,@body)) - (if (buffer-synchronized-p ,buffer) + (if (synchronizedp ,buffer) (bt:with-lock-held ((iobuf-lock (input-iobuf-of ,buffer))) (,body-fun)) (,body-fun))))) @@ -62,17 +62,17 @@ &body body) (with-gensyms (body-fun) (labels ((make-locks (body direction) - (case direction + (ecase direction (:input `(bt:with-lock-held ((iobuf-lock (input-iobuf-of ,buffer))) ,body)) (:output `(bt:with-lock-held ((iobuf-lock (output-iobuf-of ,buffer))) ,body)) - (otherwise + ((nil) (make-locks (make-locks body :output) :input))))) `(flet ((,body-fun () ,@body)) - (if (buffer-synchronized-p ,buffer) + (if (synchronizedp ,buffer) ,(make-locks `(,body-fun) direction) (,body-fun)))))) -- 2.11.4.GIT