这里是FreeRTOS的API参考http://www.freertos.org/a00122.html关于xSemaphoreTake()函数的摘录:FreeRTOS的旗语
// See if we can obtain the semaphore. If the semaphore is not available
// wait 10 ticks to see if it becomes free.
if(xSemaphoreTake(xSemaphore, (portTickType) 10) == pdTRUE)
{
// We were able to obtain the semaphore and can now access the
// shared resource.
我的问题是:我已经有信号灯这里还是我必须打电话给 xSemaphoreTake(xSemaphore, (portTickType) 10)
明确像:
// We have finished accessing the shared resource. Release the
// semaphore.
xSemaphoreGive(xSemaphore);
}