This is passing a bool (woken) where it should be passing a bool* (&woken).  This is probably only compiling due to the missing #include of pios_semaphore.h at the top of the file.