FreeRTOS 中 Mutexes 和 Binary Semaphores 的区别

在《161204_Mastering_the_FreeRTOS_Real_Time_Kernel-A_Hands-On_Tutorial_Guide.pdf》中的原文:

Even though mutexes and binary semaphores share many characteristics, the scenario shown

in Figure 63 ( where a mutex is used for mutual exclusion) is completely different to that shown

in Figure 53 ( where a binary semaphore is used for synchronization). The primary difference

is what happens to the semaphore after it has been obtained:

A semaphore that is used for mutual exclusion must always be returned.

你可能感兴趣的:(C,嵌入式,FreeRTOS,mutex,binary,semaphores)