Kernel APIs for semaphore In last post we discussed difference between mutex and semaphore. In this post we will discuss various flavors and APIs used for semaphore usage. Any locking mechanism has to deal with interrupts. Semaphore too has to deal with it. Since interrupts can call down (we will see it later) and up, any semaphore locking implementation should disable interrupts. At the same time, interrupt may use down when it is sure that it will get the lock, such cases we need to use another variant of down namely down_interruptable() and down_killable.
Read full article from Algorithms and Me: Semaphore : Kernel APIs
No comments:
Post a Comment