summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2014-04-04 21:52:39 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-04-04 21:52:39 +0200
commit2a8d65dfceb4ac35b09935a5e5fb62be1a44ab14 (patch)
treec61230f378b7488908c5f4ab1cf0217a75ab7b12 /kern
parent32be3a889794a212a5a4083de279134c22c314a3 (diff)
Use explicit prototypes for struct dev_ops fields
* device/conf.h: Include <sys/types.h>, <mach/port.h>, <mach/vm_prot.h>. Predefine struct io_req, io_req_t and io_return_t. (dev_ops): Add explicit prototypes for d_open, d_close, d_read, d_write, d_getstat, d_setstat, d_mmap, d_port_death. (nulldev_open, nulldev_close, nulldev_read, nulldev_write, nulldev_getstat, nulldev_setstat, nulldev_portdeath): Add prototypes. (nomap): Fix prototype. * device/dev_name.c (nulldev_open, nulldev_close, nulldev_read, nulldev_write, nulldev_getstat, nulldev_setstat, nulldev_portdeath): New functions. (nomap): Fix prototype. * device/ds_routines.c (dev_close): Pass 0 as flag parameter. * device/kmsg.c (kmsgclose): Drop return value. * device/kmsg.h (kmsgclose): Fix prototype. * i386/i386at/com.c (comopen): Fix prototype. (comclose): Fix prototype, drop return value. (comread, comwrite): Fix prototype. * i386/i386at/com.h (comopen, comclose, comread, comwrite): Fix prototype. * i386/i386at/conf.c (dev_ops): Use nulldev_open, nulldev_close, nulldev_read, nulldev_write, nulldev_getstat, nulldev_setstat, nulldev_portdeath where appropriate. * i386/i386at/kd.c (kdclose, kdread, kdwrite, kdmmap): Fix prototype. * i386/i386at/kd.h (kdclose, kdread, kdwrite, kdmmap): Likewise. * i386/i386at/kd_event.c (kbdopen): Likewise. * i386/i386at/kd_event.h (kbdopen): Likewise. * i386/i386at/kd_mouse.c (mouseopen): Likewise. * i386/i386at/kd_mouse.h (mouseopen): Likewise. * i386/i386at/lpr.c (lpropen, lprclose, lprread, lprwrite): Likewise. * i386/i386at/lpr.h (lpropen, lprclose, lprread, lprwrite): Likewise. * i386/i386at/mem.c (memmmap): Likewise. * i386/i386at/mem.h (memmmap): Likewise. * i386/i386at/model_dep.c (timemmap): Likewise. * i386/i386at/model_dep.h (timemmap): Likewise. * kern/mach_clock.c (timeopen, timeclose): Likewise. * kern/mach_clock.h: Include <sys/types.h>, predefine struct io_req and io_req_t. (timeopen, timeclose): Fix prototype.
Diffstat (limited to 'kern')
-rw-r--r--kern/mach_clock.c6
-rw-r--r--kern/mach_clock.h8
2 files changed, 9 insertions, 5 deletions
diff --git a/kern/mach_clock.c b/kern/mach_clock.c
index c68b460..f4a7714 100644
--- a/kern/mach_clock.c
+++ b/kern/mach_clock.c
@@ -499,13 +499,13 @@ void mapable_time_init(void)
update_mapped_time(&time);
}
-int timeopen(void)
+int timeopen(dev_t dev, int flag, io_req_t ior)
{
return(0);
}
-int timeclose(void)
+void timeclose(dev_t dev, int flag)
{
- return(0);
+ return;
}
/*
diff --git a/kern/mach_clock.h b/kern/mach_clock.h
index 827cf86..89fd335 100644
--- a/kern/mach_clock.h
+++ b/kern/mach_clock.h
@@ -29,6 +29,10 @@
#include <mach/time_value.h>
#include <kern/host.h>
#include <kern/queue.h>
+#include <sys/types.h>
+
+struct io_req;
+typedef struct io_req *io_req_t;
/* Timers in kernel. */
@@ -104,7 +108,7 @@ extern void mapable_time_init (void);
extern void timeout(timer_func_t *fcn, void *param, int interval);
extern boolean_t untimeout(timer_func_t *fcn, const void *param);
-extern int timeopen(void);
-extern int timeclose(void);
+extern int timeopen(dev_t dev, int flag, io_req_t ior);
+extern void timeclose(dev_t dev, int flag);
#endif /* _KERN_MACH_CLOCK_H_ */