static SemaphoreHandle_t xEventCounter = NULL;
xEventCounter = xSemaphoreCreateCounting(3,0);//计数3
xSemaphoreTake(xEventCounter, portMAX_DELAY);

由于计数仍然大于0,所以不会阻塞: