From 1ba3b4e7ac9d53710454c46ac5384ee44a096b70 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 27 May 2015 03:08:48 -0400 Subject: CommandProcessor: Replace volatile usages with atomics Also remove said variables from being globals. --- Source/Core/VideoCommon/CommandProcessor.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Source/Core/VideoCommon/CommandProcessor.h') diff --git a/Source/Core/VideoCommon/CommandProcessor.h b/Source/Core/VideoCommon/CommandProcessor.h index 5c49f0bb69..0b33150ce4 100644 --- a/Source/Core/VideoCommon/CommandProcessor.h +++ b/Source/Core/VideoCommon/CommandProcessor.h @@ -17,11 +17,6 @@ namespace CommandProcessor { extern SCPFifoStruct fifo; //This one is shared between gfx thread and emulator thread. - -extern volatile bool interruptSet; -extern volatile bool interruptWaiting; -extern volatile bool interruptTokenWaiting; -extern volatile bool interruptFinishWaiting; extern Common::Flag s_gpuMaySleep; // internal hardware addresses @@ -143,12 +138,19 @@ void GatherPipeBursted(); void UpdateInterrupts(u64 userdata); void UpdateInterruptsFromVideoBackend(u64 userdata); +bool IsInterruptWaiting(); +void SetInterruptTokenWaiting(bool waiting); +void SetInterruptFinishWaiting(bool waiting); + void SetCpClearRegister(); void SetCpControlRegister(); void SetCpStatusRegister(); void ProcessFifoEvents(); void Update(); -extern volatile u32 VITicks; + +u32 GetVITicks(); +void SetVITicks(u32 ticks); +void DecrementVITicks(u32 ticks); } // namespace CommandProcessor -- cgit v1.2.3