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

@@ -76,7 +76,7 @@ volatile int* XenonThreadState::suspend_flag_address() const {
int XenonThreadState::Suspend(uint32_t timeout_ms) {
// Set suspend flag.
// One of the checks should call in to OnSuspend() at some point.
xe_atomic_inc_32(&context_->suspend_flag);
poly::atomic_inc(&context_->suspend_flag);
return 0;
}
@@ -86,7 +86,7 @@ int XenonThreadState::Resume(bool force) {
context_->suspend_flag = 0;
SetEvent(debug_break_);
} else {
if (!xe_atomic_dec_32(&context_->suspend_flag)) {
if (!poly::atomic_dec(&context_->suspend_flag)) {
SetEvent(debug_break_);
}
}