[tip:tools/kvm] kvm tools: Use more readable name for ioport mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  1242bd372213369ce5894872b70e4baf8002aed5
Gitweb:     http://git.kernel.org/tip/1242bd372213369ce5894872b70e4baf8002aed5
Author:     Pekka Enberg <penberg@xxxxxxxxxx>
AuthorDate: Thu, 26 May 2011 18:59:59 +0300
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Thu, 26 May 2011 18:59:59 +0300

kvm tools: Use more readable name for ioport mutex

This patch renames the mutex in iport.c to 'ioport_mutex' and documents which
data it is used to protect.

Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/ioport.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tools/kvm/ioport.c b/tools/kvm/ioport.c
index 492ce16..d0a1aa8 100644
--- a/tools/kvm/ioport.c
+++ b/tools/kvm/ioport.c
@@ -17,19 +17,21 @@
 
 #define ioport_node(n) rb_entry(n, struct ioport, node)
 
-static u16 free_io_port_idx;
-DEFINE_MUTEX(free_io_port_idx_lock);
-static struct rb_root ioport_tree = RB_ROOT;
-bool ioport_debug;
+DEFINE_MUTEX(ioport_mutex);
+
+static u16			free_io_port_idx; /* protected by ioport_mutex */
+
+static struct rb_root		ioport_tree = RB_ROOT;
+bool				ioport_debug;
 
 static u16 ioport__find_free_port(void)
 {
 	u16 free_port;
 
-	mutex_lock(&free_io_port_idx_lock);
+	mutex_lock(&ioport_mutex);
 	free_port = IOPORT_START + free_io_port_idx * IOPORT_SIZE;
 	free_io_port_idx++;
-	mutex_unlock(&free_io_port_idx_lock);
+	mutex_unlock(&ioport_mutex);
 
 	return free_port;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux