> Date: Sat, 9 Aug 2008 14:04:24 -0400
> From: [EMAIL PROTECTED]
> To: emc-developers@lists.sourceforge.net
> Subject: Re: [Emc-developers] hardware drivers: seperate calls        for     
> reading/writing?
> 
> Chris Morley wrote:
> > Gentlemen:
> > I was reading the thread with Sebastian and John about calls in  drivers 
> > And I have a question along those lines:
> > When I made the opto ac5 driver I followed the frame work of the original 
> > Mesa driver and it had separate calls for reading and writing i/o.
> > Now after I've thought about it, I think it would be faster to do both at 
> > the same time (I don't have to decode the mask bits four times,only twice)
> > Is there any reason to have separate calls for reading and writing to an 
> > I/O port?
> > 
> > Thanks
> > Chris Morley
> 
> Yes - usually the desired flow is:
> 
> 1) read inputs
> 2) do some processing using that data
> 3) write outputs with the results
> 
> If you read and write at the same time, you wind up with something like:
> 
> 1) write the outputs that were computed in the last run of the thread
> 2) while reading new data
> 3) then compute new output
> 4) that you do nothing with until the next run of the thread
> 
> Regards,
> 
> John Kasunich

Ok I can see the advantage in some circumstances.
Certainly gives more flexibility.
Thanks.

_________________________________________________________________

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to