On Tue, Sep 14, 2010 at 10:31 PM, Greg Freemyer <[email protected]>wrote:

> I think a mutex will do what you need.
>
> Have you looked at:   Documentation/mutex-design.txt
>
> You should find the Documentation folder at the top level of your
> kernel source tree.
>
> The mutex calls are at the bottom of the file.
>
> Ok.

Look around at the kernel source for some example uses.  Especially
> where to call mutex_init().  You obviously don't want to call that in
> your write() routine.
>
> Why not in write routine?
I discussed this thing with a friend he suggested to implement this in write
routine() .

Reply via email to