Why the interactivity of semaphore is better than mutual lock???
Please look at the code:
Code:
for(i = 0; i < 100; i++) { If I use the semaphore instead of the mutex_lock, it will never happen, the B will get the semaphore when the A isn't execute 100 times loop. Does this the mutex feature?? Can anybody tell me, why it is?? |
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate of:
http://www.linuxquestions.org/questi...2/#post4281467 Pending closure of this threads by the mods assigned to this forum, please post all replies there. tgvlcw, Welcome to LQ. Hope you get the help you need here. BTW, please review the LQ Rules & try not to cross post again. It's against the rules for a good reason -- it dilutes the discussion. Thank you for your co-operation. |
All times are GMT -5. The time now is 04:38 PM. |