Results 1 to 1 of 1
Hi, I am very confused about the lock funtion "spin_lock(&sem)" and "spin_lock_bh(&sem)".
If I have a critical section and I used a function named "critical" wrapping it.
(1)In one place ...
- 07-16-2005 #1Just Joined!
- Join Date
- Nov 2004
- Posts
- 43
about LOCK
Hi, I am very confused about the lock funtion "spin_lock(&sem)" and "spin_lock_bh(&sem)".
If I have a critical section and I used a function named "critical" wrapping it.
(1)In one place i use:
spin_lock_bh(&sem)
critical();
spin_unlock_bh
(2) in another place i use
spin_lock(&sem)
critical();
spin_unlock(&sem)
My question is : is the above wrong? Doe it still probably cause Deadlock?
Thank you very much!


Reply With Quote
