6.18 void rtkSemaphoreV(struct Semaphore *s)

This function increments the value and releases the semaphore pointed to by s. If there are awaiting threads, the thread that has waited for the longest becomes ready again. This may cause the current thread be suspended so that a released thread of a higher priority may execute.

This function should not be used in an ISR because it triggers a context switch. If a context switch happens in an ISR, the stack space used by the ISR is not freed.



Copyright © 2008-10-25 by Tak Auyeung