From 029ea3ffa9e56d33eef2e859c98848f722f63b1c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 6 May 2007 16:51:49 +0000 Subject: 2007-05-06 Thomas Schwinge * device/kmsg.c: Include . (kmsg_lock): Use `decl_simple_lock_data'. (kmsgread, kmsg_read_done): Add two typecasts. --- ChangeLog | 4 ++++ device/kmsg.c | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7bb0c1..f39c42d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-05-06 Thomas Schwinge + * device/kmsg.c: Include . + (kmsg_lock): Use `decl_simple_lock_data'. + (kmsgread, kmsg_read_done): Add two typecasts. + * device/buf.h (minphys): Add return type. * device/device_types_kernel.h: We're not in the eighties anymore... * device/io_req.h: Likewise. diff --git a/device/kmsg.c b/device/kmsg.c index 384f89a..c8bd897 100644 --- a/device/kmsg.c +++ b/device/kmsg.c @@ -1,5 +1,7 @@ /* GNU Mach Kernel Message Device. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + + Copyright (C) 1998, 1999, 2007 Free Software Foundation, Inc. + Written by OKUJI Yoshinori. This is free software; you can redistribute it and/or modify @@ -16,12 +18,13 @@ You should have received a copy of the GNU General Public License along with the software; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* Now kmsg provides stream interface, not random access methods. */ +/* kmsg provides a stream interface. */ #include #include #include +#include #include #include #include @@ -41,7 +44,7 @@ static queue_head_t kmsg_read_queue; /* Used for exclusive access to the device */ static int kmsg_in_use; /* Used for exclusive access to the routines */ -static simple_lock_data_t kmsg_lock; +decl_simple_lock_data (static, kmsg_lock); /* If already initialized or not */ static int kmsg_init_done = 0; @@ -108,7 +111,7 @@ kmsgread (dev_t dev, io_req_t ior) } ior->io_done = kmsg_read_done; - enqueue_tail (&kmsg_read_queue, ior); + enqueue_tail (&kmsg_read_queue, (queue_entry_t) ior); simple_unlock (&kmsg_lock); return D_IO_QUEUED; } @@ -154,7 +157,7 @@ kmsg_read_done (io_req_t ior) { /* The queue is empty. */ ior->io_done = kmsg_read_done; - enqueue_tail (&kmsg_read_queue, ior); + enqueue_tail (&kmsg_read_queue, (queue_entry_t) ior); simple_unlock (&kmsg_lock); return FALSE; } -- cgit v1.2.3