There was no check of the return value implemented therefore xSemaphoreTake was just executed and not locked