stratosphere: use SdkMutex/SdkRecursiveMutex over Mutex

This commit is contained in:
Michael Scire
2021-09-29 22:52:50 -07:00
parent a4fe1bb5d8
commit 41ab4c2c68
70 changed files with 188 additions and 645 deletions

View File

@@ -18,7 +18,7 @@
namespace ams::fatal::srv {
FatalEventManager::FatalEventManager() : lock(false) {
FatalEventManager::FatalEventManager() : lock() {
/* Just create all the events. */
for (size_t i = 0; i < FatalEventManager::NumFatalEvents; i++) {
R_ABORT_UNLESS(os::CreateSystemEvent(std::addressof(this->events[i]), os::EventClearMode_AutoClear, true));

View File

@@ -24,7 +24,7 @@ namespace ams::fatal::srv {
public:
static constexpr size_t NumFatalEvents = 3;
private:
os::Mutex lock;
os::SdkMutex lock;
size_t num_events_gotten = 0;
os::SystemEventType events[NumFatalEvents];
public:

View File

@@ -23,8 +23,8 @@ namespace ams::fatal::srv {
/* Convenience definitions. */
constexpr size_t MaximumLineLength = 0x20;
os::Mutex g_format_lock(false);
char g_format_buffer[2 * os::MemoryPageSize];
constinit os::SdkMutex g_format_lock;
constinit char g_format_buffer[2 * os::MemoryPageSize];
}