On Fri, 16 Jun 2000, Sharad Joshi wrote:
> using inb/outb, i want to make use of the serial driver. So is it possible
> to open the device ttyS0 with sys_open() and do sys_read/write? Or is there
> any other way in which a kernel module can read/write to a device.
It completely depends in what context runs your driver. If your driver
runs on behalf of a task context (ie as a result of ioctl(), read()
write() into your driver), then I would presume it to be legal (are
deadlock possible?). Now, if this is e.g. from interrupt, this is not
A way to implement it which will always be correct is to have a user-level
process in an endless loop of ioctl() in your driver, your driver passing
it the data to write to the serial port through the ioctl().
That could even work, assuming you have a properly handled queue, from
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:11 EST