@@ -240,15 +240,15 @@ #endif static objc_uncaught_exception_handler_t uncaughtExceptionHandler; static struct objc_exception emergencyExceptions[NUM_EMERGENCY_EXCEPTIONS]; #ifdef OF_HAVE_THREADS -static of_spinlock_t emergencyExceptionsSpinlock; +static OFSpinlock emergencyExceptionsSpinlock; OF_CONSTRUCTOR() { - if (of_spinlock_new(&emergencyExceptionsSpinlock) != 0) + if (OFSpinlockNew(&emergencyExceptionsSpinlock) != 0) OBJC_ERROR("Cannot create spinlock!"); } #endif static uint64_t @@ -709,18 +709,18 @@ static void emergencyExceptionCleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { #ifdef OF_HAVE_THREADS - if (of_spinlock_lock(&emergencyExceptionsSpinlock) != 0) + if (OFSpinlockLock(&emergencyExceptionsSpinlock) != 0) OBJC_ERROR("Cannot lock spinlock!"); #endif ex->class = 0; #ifdef OF_HAVE_THREADS - if (of_spinlock_unlock(&emergencyExceptionsSpinlock) != 0) + if (OFSpinlockUnlock(&emergencyExceptionsSpinlock) != 0) OBJC_ERROR("Cannot unlock spinlock!"); #endif } void @@ -729,11 +729,11 @@ struct objc_exception *e = calloc(1, sizeof(*e)); bool emergency = false; if (e == NULL) { #ifdef OF_HAVE_THREADS - if (of_spinlock_lock(&emergencyExceptionsSpinlock) != 0) + if (OFSpinlockLock(&emergencyExceptionsSpinlock) != 0) OBJC_ERROR("Cannot lock spinlock!"); #endif for (uint_fast8_t i = 0; i < NUM_EMERGENCY_EXCEPTIONS; i++) { if (emergencyExceptions[i].exception.class == 0) { @@ -744,11 +744,11 @@ break; } } #ifdef OF_HAVE_THREADS - if (of_spinlock_unlock(&emergencyExceptionsSpinlock) != 0) + if (OFSpinlockUnlock(&emergencyExceptionsSpinlock) != 0) OBJC_ERROR("Cannot lock spinlock!"); #endif } if (e == NULL)