24 Nov
2004
24 Nov
'04
8:51 a.m.
Adrian Hey wrote:
On Tuesday 23 Nov 2004 9:29 am, Keean Schupke wrote:
myDriver :: (Chan in,Chan out) -> State -> IO State myDriver (in,out) state = do -- read commands from in -- process commands -- reply on out myDriver (in,out) new_state
How does this solve the problem we're talking about (namely preventing the accidental creation of multiple processes all of which believe they are "the" device driver for a particular unique resource)?
So do you agree with me that the protection against two drivers "opening" the same device does not belong in the driver code? (Because if it sits there I could mistakenly have another driver open the same device.) -- Lennart