Clarification regarding design of a device.

mindentropy mindentropy at gmail.com
Mon May 2 14:02:15 EDT 2011


On Monday 02 May 2011 10:58:45 PM Mulyadi Santosa wrote:

> 
> I am not keen regarding char/block device management, but I think you
> should separate those streams.
> 
> How? Well, same thing like you open a same file twice, right? You're
> given two different file descriptor. After all, the "open", "read" and
> "write" handler of device IMHO always assume that we wanna achieve
> such different stream, right?

Although given two file descriptors when I write some content it will be on the 
same file right? Shouldn't the same file analogy apply?

I thought about using file descriptors to separate streams, but have to take 
care of ensuring completion of processing the buffer when closed.  This I feel 
should be done if the descriptor gets reused.



More information about the Kernelnewbies mailing list