Matthew Dillon wrote:
>
> I think it would be a whole lot easier to implement mmap() on the
> device, then allow the user process to mmap() the device buffer
> and read() and write() it directly. I don't think you need to
> implement any ioctl's for this problem.
>
> fd = open device
> ptr = mmap(...)
>
> fd = open file
> read(fd, ptr, BUFSIZE) read from file, store into device buf
> ...
> write(fd, ptr, BUFSIZE) read from device buf, store into file
>
>
I am sorry that i missed this point in my previous post. well the
problem with
the mmap is that my device does not have a buffer always. earlier the
'read'
ioctl on the device used to sleep till a buffer was available. what does
the
mmap do?? can it block?? i am sorry if this sounds naive bcoz i am a
relative
newbie
thanx in advance
-joy
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message