ProAnswers.org

What is difference between wake_up ( ) and wake_up_interruptible ( ) APIs in linux kernel?

What is difference between wake_up ( ) and wake_up_interruptible ( ) APIs in linux kernel ?
When should should use which one, how it should be decided ?

Volatile is nothing but the qualifier that is applied to a variable while declaring it.which tells the compiler that the value of the variable may change at any time-without any action being taken by the nearby code.

wake_up - wakes exactly one exclusive sleeping process in TASK_INTERRUPTIBLE or TASK_UNINTERRUPTIBLE state from the wait queue.
wake_up_interruptible - wakes only one exclusive sleeping process in TASK_INTERRUPTIBLE from the wait queue

Wake_up_interruptible might be used in semaphore which wakes up only one process waiting for the signal from the wait queue. If you need to wake up only processes which are waiting on an event, then wake_up_interruptible must be used.

To generally wake up all the processes to some activity such as device I/O then wake_up has to be used.