mirror of https://github.com/PCSX2/pcsx2.git
Threading: DarwinSemaphore.cpp things no longer need to be cancellation points
This commit is contained in:
parent
faf750a544
commit
be6598e224
|
@ -42,14 +42,8 @@
|
|||
|
||||
static void MACH_CHECK(kern_return_t mach_retval)
|
||||
{
|
||||
switch (mach_retval)
|
||||
if (mach_retval != KERN_SUCCESS)
|
||||
{
|
||||
case KERN_SUCCESS:
|
||||
break;
|
||||
case KERN_ABORTED: // Awoken due reason unrelated to semaphore (e.g. pthread_cancel)
|
||||
pthread_testcancel(); // Unlike sem_wait, mach semaphore ops aren't cancellation points
|
||||
// fallthrough
|
||||
default:
|
||||
fprintf(stderr, "mach error: %s", mach_error_string(mach_retval));
|
||||
assert(mach_retval == KERN_SUCCESS);
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ namespace Threading
|
|||
class UserspaceSemaphore
|
||||
{
|
||||
KernelSemaphore m_sema;
|
||||
std::atomic<uint32_t> m_counter{0};
|
||||
std::atomic<int32_t> m_counter{0};
|
||||
|
||||
public:
|
||||
UserspaceSemaphore() = default;
|
||||
|
|
Loading…
Reference in New Issue