Updated RTOS support for mutex