Thank you all.
I'm mostly concerned about a module which export a read/write proc entity to user world,
but would be most thankful for a general answer.
how should I lock the proc from user access ?
and more generally: If i can be invoked concurrently on several processors, should I lock
every variable from myself, too ?
thanks again ppl !
R.
On 9/6/05, Fawad Lateef <fawadlateef@xxxxxxxxx> wrote:
On 9/6/05, Thomas Petazzoni <thomas.petazzoni@xxxxxxxx> wrote:
> Hi,
>
> Roy Smith a écrit :
>
> > can the module be invoked on several processors on the same time ?
> > if yes, locking must be made on every variable !!
>
> It depends on what does your module. Try to be more precise.
>
> Is it a block device driver, a character device driver, does it provide
> a /proc interface, a /sys interface, an ioctl() interface, or whatever ?
>
Yes be precise, but I want to mention that if your module registers
with kernel in the form of device driver etc that is it is
providing/exporting call-back funcitons to the kernel then they can be
called on different processors and in differen contexts and this also
applies to threads, work-queues etc if you implement them in the
module. And I think your module will be things which I mentioned .....
--
Fawad Lateef