diff options
author | attilio <attilio@FreeBSD.org> | 2010-04-28 15:38:01 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2010-04-28 15:38:01 +0000 |
commit | 6dfd3f303086ff8e0db146c2e70c33de1a239696 (patch) | |
tree | fa18924d920e93a232bbaba63497b39499a9b76b /sys/i386/include/iodev.h | |
parent | 60e1354e61b43b340b1c25761d1b3d5fbc35b000 (diff) | |
download | FreeBSD-src-6dfd3f303086ff8e0db146c2e70c33de1a239696.zip FreeBSD-src-6dfd3f303086ff8e0db146c2e70c33de1a239696.tar.gz |
- Extract the IODEV_PIO interface from ia64 and make it MI.
In the end, it does help fixing /dev/io usage from multithreaded
processes.
- On i386 and amd64 the old behaviour is kept but multithreaded
processes must use the new interface in order to work well.
- Support for the other architectures is greatly improved, where
necessary, by the necessity to define very small things now.
Manpage update will happen shortly.
Sponsored by: Sandvine Incorporated
PR: threads/116181
Reviewed by: emaste, marcel
MFC after: 3 weeks
Diffstat (limited to 'sys/i386/include/iodev.h')
-rw-r--r-- | sys/i386/include/iodev.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sys/i386/include/iodev.h b/sys/i386/include/iodev.h index 1a0a17a..9f53cac 100644 --- a/sys/i386/include/iodev.h +++ b/sys/i386/include/iodev.h @@ -25,7 +25,22 @@ * * $FreeBSD$ */ +#ifndef _MACHINE_IODEV_H_ +#define _MACHINE_IODEV_H_ -d_open_t ioopen; -d_close_t ioclose; -d_ioctl_t ioioctl; +#ifdef _KERNEL +#include <machine/cpufunc.h> + +#define iodev_read_1 inb +#define iodev_read_2 inw +#define iodev_read_4 inl +#define iodev_write_1 outb +#define iodev_write_2 outw +#define iodev_write_4 outl + +int iodev_open(struct thread *td); +int iodev_close(struct thread *td); +int iodev_ioctl(u_long cmd, caddr_t data); + +#endif /* _KERNEL */ +#endif /* _MACHINE_IODEV_H_ */ |