mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard Change semaphore<> interface to Lockable (+ exotic try_unlock method)
This commit is contained in:
parent
5e556a87ff
commit
ca5158a03e
50 changed files with 283 additions and 382 deletions
|
|
@ -320,7 +320,7 @@ void audio_config::on_task()
|
|||
|
||||
// send aftermix event (normal audio event)
|
||||
|
||||
semaphore_lock lock(mutex);
|
||||
std::lock_guard lock(mutex);
|
||||
|
||||
for (u64 key : keys)
|
||||
{
|
||||
|
|
@ -748,7 +748,7 @@ error_code cellAudioSetNotifyEventQueue(u64 key)
|
|||
return CELL_AUDIO_ERROR_NOT_INIT;
|
||||
}
|
||||
|
||||
semaphore_lock lock(g_audio->mutex);
|
||||
std::lock_guard lock(g_audio->mutex);
|
||||
|
||||
for (auto k : g_audio->keys) // check for duplicates
|
||||
{
|
||||
|
|
@ -783,7 +783,7 @@ error_code cellAudioRemoveNotifyEventQueue(u64 key)
|
|||
return CELL_AUDIO_ERROR_NOT_INIT;
|
||||
}
|
||||
|
||||
semaphore_lock lock(g_audio->mutex);
|
||||
std::lock_guard lock(g_audio->mutex);
|
||||
|
||||
for (auto i = g_audio->keys.begin(); i != g_audio->keys.end(); i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue