@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2021 Jonathan Schleifer + * Copyright (c) 2008-2022 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -22,15 +22,15 @@ #import "private.h" #ifdef OF_HAVE_THREADS # import "OFPlainMutex.h" -static struct lock { +static struct Lock { id object; int count; OFPlainRecursiveMutex rmutex; - struct lock *next; + struct Lock *next; } *locks = NULL; static OFPlainMutex mutex; OF_CONSTRUCTOR() @@ -45,11 +45,11 @@ { if (object == nil) return 0; #ifdef OF_HAVE_THREADS - struct lock *lock; + struct Lock *lock; if (OFPlainMutexLock(&mutex) != 0) OBJC_ERROR("Failed to lock mutex!"); /* Look if we already have a lock */ @@ -96,11 +96,11 @@ { if (object == nil) return 0; #ifdef OF_HAVE_THREADS - struct lock *lock, *last = NULL; + struct Lock *lock, *last = NULL; if (OFPlainMutexLock(&mutex) != 0) OBJC_ERROR("Failed to lock mutex!"); for (lock = locks; lock != NULL; lock = lock->next) { @@ -128,10 +128,10 @@ OBJC_ERROR("Failed to unlock mutex!"); return 0; } - OBJC_ERROR("objc_sync_exit() was called for an object not locked!"); + OBJC_ERROR("objc_sync_exit() was called for an unlocked object!"); #else return 0; #endif }