[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/66] device/kmsg.c: use boolean instead of an int
From: |
Marin Ramesa |
Subject: |
[PATCH 16/66] device/kmsg.c: use boolean instead of an int |
Date: |
Thu, 5 Dec 2013 22:03:10 +0100 |
* device/kmsg.c (kmsg_in_use): Use boolean instead of an int.
---
device/kmsg.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/device/kmsg.c b/device/kmsg.c
index c8bd897..0e18725 100644
--- a/device/kmsg.c
+++ b/device/kmsg.c
@@ -42,7 +42,7 @@ static int kmsg_read_offset;
/* I/O request queue for blocking read */
static queue_head_t kmsg_read_queue;
/* Used for exclusive access to the device */
-static int kmsg_in_use;
+static boolean_t kmsg_in_use;
/* Used for exclusive access to the routines */
decl_simple_lock_data (static, kmsg_lock);
/* If already initialized or not */
@@ -55,7 +55,7 @@ kmsginit (void)
kmsg_write_offset = 0;
kmsg_read_offset = 0;
queue_init (&kmsg_read_queue);
- kmsg_in_use = 0;
+ kmsg_in_use = FALSE;
simple_lock_init (&kmsg_lock);
}
@@ -70,7 +70,7 @@ kmsgopen (dev_t dev, int flag, io_req_t ior)
return D_ALREADY_OPEN;
}
- kmsg_in_use = 1;
+ kmsg_in_use = TRUE;
simple_unlock (&kmsg_lock);
return D_SUCCESS;
@@ -81,7 +81,7 @@ io_return_t
kmsgclose (dev_t dev, int flag)
{
simple_lock (&kmsg_lock);
- kmsg_in_use = 0;
+ kmsg_in_use = FALSE;
simple_unlock (&kmsg_lock);
return D_SUCCESS;
--
1.8.1.4
- [PATCH 09/66] device/blkio.c: remove function, (continued)
- [PATCH 09/66] device/blkio.c: remove function, Marin Ramesa, 2013/12/05
- [PATCH 10/66] device/chario.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 11/66] device/cirbuf.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 12/66] device/cons.h: remove ifdef, Marin Ramesa, 2013/12/05
- [PATCH 14/66] device/if_ether.h: remove unused variable, Marin Ramesa, 2013/12/05
- [PATCH 13/66] device/dev_lookup.c: remove unused lock, Marin Ramesa, 2013/12/05
- [PATCH 15/66] device/if_ether.h: remove ifdef, Marin Ramesa, 2013/12/05
- [PATCH 16/66] device/kmsg.c: use boolean instead of an int,
Marin Ramesa <=
- [PATCH 17/66] device/kmsg.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 18/66] device/tty.h, chario.h: move prototype, Marin Ramesa, 2013/12/05
- [PATCH 19/66] i386/i386/db_interface.c: use boolean instead of an int, Marin Ramesa, 2013/12/05
- [PATCH 20/66] i386/i386/db_interface.c: remove dead assignment, Marin Ramesa, 2013/12/05
- [PATCH 22/66] i386/i386/db_interface.c: remove dead assignment, Marin Ramesa, 2013/12/05
- [PATCH 21/66] i386/i386/db_interface.c: remove dead assignment, Marin Ramesa, 2013/12/05
- [PATCH 24/66] i386/i386/mp_desc.c: remove unused variable, Marin Ramesa, 2013/12/05