Hi All,
I have a situation where I have to lock the ioctl provided in my driver. I
have a uni processor (ARM) system.
I am using Mutex as the lock for my ioctl.
DEFINE_MUTEX(&lock_ioctl);
MyIoctl()
{
Mutex_lock(&lock_ioctl);
Switch(){
...........
}
Mutex_unlock(&lock_ioctl);
return 0;
}
I just wanted to know am I using the best lock available for the situation
aor do I have any flaw in my implementation???
And from LKD I read that "*lock the data not the code*" and which I amI have a situation where I have to lock the ioctl provided in my driver. I
have a uni processor (ARM) system.
I am using Mutex as the lock for my ioctl.
DEFINE_MUTEX(&lock_ioctl);
MyIoctl()
{
Mutex_lock(&lock_ioctl);
Switch(){
...........
}
Mutex_unlock(&lock_ioctl);
return 0;
}
I just wanted to know am I using the best lock available for the situation
aor do I have any flaw in my implementation???
literally doing so ?? any comments on this ?
I have interrupts in my driver which is nothing to do with the lock.I am
taking care that where ever I return in my ioctl the lock is released.
Thanks ,
Praveen
I have interrupts in my driver which is nothing to do with the lock.I am
taking care that where ever I return in my ioctl the lock is released.
Thanks ,
Praveen
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies