Several changes for timestamp bundle:
Fully defined the structure. Single copy of it + single timer across all modules, managing it is now the responsibility of KernelState. add global_critical_region::PrepareToAcquire, which uses Prefetchw on the global crit. We now know we can use Prefetchw on all cpus that have AVX. add KeQueryInterruptTime, which is used by some dashboards. add threading::NanoSleep
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#define XENIA_BASE_MUTEX_H_
|
||||
#include <mutex>
|
||||
#include "platform.h"
|
||||
|
||||
#include "memory.h"
|
||||
#define XE_ENABLE_FAST_WIN32_MUTEX 1
|
||||
namespace xe {
|
||||
|
||||
@@ -149,6 +149,12 @@ class global_critical_region {
|
||||
return global_unique_lock_type(mutex());
|
||||
}
|
||||
|
||||
static inline void PrepareToAcquire() {
|
||||
#if XE_PLATFORM_WIN32 == 1
|
||||
swcache::PrefetchW(&mutex());
|
||||
#endif
|
||||
}
|
||||
|
||||
// Acquires a deferred lock on the global critical section.
|
||||
static inline global_unique_lock_type AcquireDeferred() {
|
||||
return global_unique_lock_type(mutex(), std::defer_lock);
|
||||
|
||||
Reference in New Issue
Block a user