- while( us->Status == THREAD_STAT_SEMAPHORESLEEP )
- {
- Threads_Yield();
- if(us->Status == THREAD_STAT_SEMAPHORESLEEP)
- Log_Warning("Threads", "Semaphore %p %s:%s re-schedulued while asleep",
- Sem, Sem->ModName, Sem->Name);
- }
+ Threads_int_WaitForStatusEnd( THREAD_STAT_SEMAPHORESLEEP );
+ // We're only woken when there's something avaliable (or a signal arrives)