summaryrefslogtreecommitdiff
path: root/device
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2013-12-05 22:03:10 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-12-08 23:52:06 +0900
commitcc2dd46fb9672c2481104d05f3cdded5a5c9130a (patch)
treefa68e22c05db6fe746cd8adfe3042a40737ec87b /device
parentd591ae773032ea0571bb1488ded979a384baae77 (diff)
device/kmsg.c: use boolean instead of an int
* device/kmsg.c (kmsg_in_use): Use boolean instead of an int.
Diffstat (limited to 'device')
-rw-r--r--device/kmsg.c8
1 files 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;