[PATCH 05/10] staging: unisys: added spinlock comments visorchannel_funcs

Erik Arfvidson erik.arfvidson at unisys.com
Mon Oct 27 21:14:03 UTC 2014


This patch adds comment documentation to visorchannel_tag struct

Signed-off-by: Erik Arfvidson <erik.arfvidson at unisys.com>
---
 drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 01a44c5..47dc48e 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -33,9 +33,13 @@ struct VISORCHANNEL_Tag {
 	CHANNEL_HEADER chan_hdr;
 	uuid_le guid;
 	ulong size;
-	BOOL needs_lock;
-	spinlock_t insert_lock;
-	spinlock_t remove_lock;
+	BOOL needs_lock; /* Some channels don't need lock due to simplicity */
+	/* The guest can remove from certain queues, but cannot insert into
+	 * those queues. The guest can insert into other queues, but can't
+	 * remove from those queues . This is based on the queue type.
+	 */
+	spinlock_t insert_lock; /* Protects queue insertion variables */
+	spinlock_t remove_lock; /* Protects queue from removal variables */
 
 	struct {
 		SIGNAL_QUEUE_HEADER req_queue;
-- 
1.9.1



More information about the devel mailing list