aboutsummaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2012-10-24 13:00:08 -0400
committerWill Deacon <will.deacon@arm.com>2015-06-01 16:39:53 +0100
commitd3476f7d3bb7cee0b620cf207c168cb4f5b5c41e (patch)
treea405a280981143daa5d9585e078ab4cd410518d5 /hw
parenta4d8c55eb29a7344befcec02a7834c7cbeedcaa1 (diff)
downloadkvmtool-d3476f7d3bb7cee0b620cf207c168cb4f5b5c41e.tar.gz
kvm tools: use mutex abstraction instead of pthread mutex
We already have something to wrap pthread with mutex_[init,lock,unlock] calls. This patch creates a new struct mutex abstraction and moves everything to work with it. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/serial.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/serial.c b/hw/serial.c
index a177a7f2..53b684ab 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -22,7 +22,7 @@
#define UART_IIR_TYPE_BITS 0xc0
struct serial8250_device {
- pthread_mutex_t mutex;
+ struct mutex mutex;
u8 id;
u16 iobase;
@@ -55,7 +55,7 @@ struct serial8250_device {
static struct serial8250_device devices[] = {
/* ttyS0 */
[0] = {
- .mutex = PTHREAD_MUTEX_INITIALIZER,
+ .mutex = MUTEX_INITIALIZER,
.id = 0,
.iobase = 0x3f8,
@@ -65,7 +65,7 @@ static struct serial8250_device devices[] = {
},
/* ttyS1 */
[1] = {
- .mutex = PTHREAD_MUTEX_INITIALIZER,
+ .mutex = MUTEX_INITIALIZER,
.id = 1,
.iobase = 0x2f8,
@@ -75,7 +75,7 @@ static struct serial8250_device devices[] = {
},
/* ttyS2 */
[2] = {
- .mutex = PTHREAD_MUTEX_INITIALIZER,
+ .mutex = MUTEX_INITIALIZER,
.id = 2,
.iobase = 0x3e8,
@@ -85,7 +85,7 @@ static struct serial8250_device devices[] = {
},
/* ttyS3 */
[3] = {
- .mutex = PTHREAD_MUTEX_INITIALIZER,
+ .mutex = MUTEX_INITIALIZER,
.id = 3,
.iobase = 0x2e8,