Switching to xe::mutex.
This commit is contained in:
@@ -81,7 +81,7 @@ X_RESULT XXMPApp::XMPCreateTitlePlaylist(
|
||||
xe::store_and_swap<uint32_t>(memory_->TranslateVirtual(out_playlist_handle),
|
||||
playlist->handle);
|
||||
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
std::lock_guard<xe::mutex> lock(mutex_);
|
||||
playlists_.insert({playlist->handle, playlist.get()});
|
||||
playlist.release();
|
||||
return X_ERROR_SUCCESS;
|
||||
@@ -89,7 +89,7 @@ X_RESULT XXMPApp::XMPCreateTitlePlaylist(
|
||||
|
||||
X_RESULT XXMPApp::XMPDeleteTitlePlaylist(uint32_t playlist_handle) {
|
||||
XELOGD("XMPDeleteTitlePlaylist(%.8X)", playlist_handle);
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
std::lock_guard<xe::mutex> lock(mutex_);
|
||||
auto it = playlists_.find(playlist_handle);
|
||||
if (it == playlists_.end()) {
|
||||
XELOGE("Playlist %.8X not found", playlist_handle);
|
||||
@@ -109,7 +109,7 @@ X_RESULT XXMPApp::XMPPlayTitlePlaylist(uint32_t playlist_handle,
|
||||
XELOGD("XMPPlayTitlePlaylist(%.8X, %.8X)", playlist_handle, song_handle);
|
||||
Playlist* playlist = nullptr;
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
std::lock_guard<xe::mutex> lock(mutex_);
|
||||
auto it = playlists_.find(playlist_handle);
|
||||
if (it == playlists_.end()) {
|
||||
XELOGE("Playlist %.8X not found", playlist_handle);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "xenia/base/mutex.h"
|
||||
#include "xenia/kernel/app.h"
|
||||
#include "xenia/kernel/kernel_state.h"
|
||||
|
||||
@@ -101,7 +102,7 @@ class XXMPApp : public XApp {
|
||||
Playlist* active_playlist_;
|
||||
int active_song_index_;
|
||||
|
||||
std::mutex mutex_;
|
||||
xe::mutex mutex_;
|
||||
std::unordered_map<uint32_t, Playlist*> playlists_;
|
||||
uint32_t next_playlist_handle_;
|
||||
uint32_t next_song_handle_;
|
||||
|
||||
Reference in New Issue
Block a user