Migrating atomic ops to std::atomic where possible and poly.

This commit is contained in:
Ben Vanik
2014-07-12 17:48:54 -07:00
parent bf882714d0
commit 9b78dd977b
18 changed files with 174 additions and 139 deletions

View File

@@ -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) {

View File

@@ -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_;