Migrating atomic ops to std::atomic where possible and poly.
This commit is contained in:
@@ -406,7 +406,7 @@ void XThread::LeaveCriticalRegion() {
|
||||
}
|
||||
|
||||
uint32_t XThread::RaiseIrql(uint32_t new_irql) {
|
||||
return xe_atomic_exchange_32(new_irql, &irql_);
|
||||
return irql_.exchange(new_irql);
|
||||
}
|
||||
|
||||
void XThread::LowerIrql(uint32_t new_irql) {
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_XTHREAD_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_XTHREAD_H_
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include <xenia/kernel/xobject.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
@@ -94,7 +96,7 @@ private:
|
||||
|
||||
char* name_;
|
||||
|
||||
uint32_t irql_;
|
||||
std::atomic<uint32_t> irql_;
|
||||
xe_mutex_t* apc_lock_;
|
||||
NativeList* apc_list_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user