| Index: gpu/ipc/service/gpu_watchdog_thread.h
|
| diff --git a/gpu/ipc/service/gpu_watchdog_thread.h b/gpu/ipc/service/gpu_watchdog_thread.h
|
| index cbb828d7f4e9f9ccf63487d7135fd6214a61c342..0489286dfe6e85194820b7e7d8efc7d0da6bbf2e 100644
|
| --- a/gpu/ipc/service/gpu_watchdog_thread.h
|
| +++ b/gpu/ipc/service/gpu_watchdog_thread.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef GPU_IPC_SERVICE_GPU_WATCHDOG_THREAD_H_
|
| #define GPU_IPC_SERVICE_GPU_WATCHDOG_THREAD_H_
|
|
|
| +#include "base/atomicops.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| @@ -37,10 +38,7 @@ class GPU_EXPORT GpuWatchdogThread
|
| public:
|
| static scoped_refptr<GpuWatchdogThread> Create();
|
|
|
| - // Accessible on watched thread but only modified by watchdog thread.
|
| - bool armed() const { return armed_; }
|
| void PostAcknowledge();
|
| -
|
| void CheckArmed();
|
|
|
| // Must be called after a PowerMonitor has been created. Can be called from
|
| @@ -97,9 +95,14 @@ class GPU_EXPORT GpuWatchdogThread
|
|
|
| base::MessageLoop* watched_message_loop_;
|
| base::TimeDelta timeout_;
|
| - volatile bool armed_;
|
| + bool armed_;
|
| GpuWatchdogTaskObserver task_observer_;
|
|
|
| + // |awaiting_acknowledge_| is only ever read on the watched thread, but may
|
| + // be modified on either the watched or watchdog thread. Reads/writes should
|
| + // be careful to ensure that appropriate synchronization is used.
|
| + base::subtle::Atomic32 awaiting_acknowledge_;
|
| +
|
| // True if the watchdog should wait for a certain amount of CPU to be used
|
| // before killing the process.
|
| bool use_thread_cpu_time_;
|
|
|