mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-07-11 01:34:17 +02:00
Utilities: Add TryWait and spin waits to semaphore and mutex
This commit is contained in:
@@ -165,6 +165,11 @@ void Threading::Semaphore::WaitNoCancel(const wxTimeSpan& timeout)
|
||||
pthread_setcancelstate(oldstate, NULL);
|
||||
}
|
||||
|
||||
bool Threading::Semaphore::TryWait()
|
||||
{
|
||||
return sem_trywait(&m_sema) == 0;
|
||||
}
|
||||
|
||||
int Threading::Semaphore::Count()
|
||||
{
|
||||
int retval;
|
||||
|
||||
Reference in New Issue
Block a user