kernel: destroy untouched static rwlocks without allocation

This commit is contained in:
Chai T authored and nmzik committed 2026-10-29 18:32:14 +01:00
1 parent 97bef2992f
commit 4592e4c178
2 files changed
+16 -1

No files matched your search

+4 -1
View File
@@ -2277,7 +2277,10 @@ int KYTY_SYSV_ABI PthreadRwlockDestroy(PthreadRwlock* rwlock) {
return KERNEL_ERROR_EINVAL;
}
EXIT_NOT_IMPLEMENTED(*rwlock == nullptr);
// SCE_PTHREAD_RWLOCK_INITIALIZER has no allocated resources until first use.
if (*rwlock == nullptr) {
return OK;
}
{
std::lock_guard lock((*rwlock)->m);