summaryrefslogtreecommitdiff
path: root/src/core/core_timing.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2015-02-13 15:53:34 -0500
committerGravatar bunnei2015-02-13 15:53:34 -0500
commit29a9e4ac25504bee82f273184a1afcc88a3e61e1 (patch)
tree9fa96cdc2bc180ac4c5a2c33158ae7cc60f2a308 /src/core/core_timing.cpp
parentMerge pull request #571 from lioncash/cleanup (diff)
parentcore: Apply static to local functions (diff)
downloadyuzu-29a9e4ac25504bee82f273184a1afcc88a3e61e1.tar.gz
yuzu-29a9e4ac25504bee82f273184a1afcc88a3e61e1.tar.xz
yuzu-29a9e4ac25504bee82f273184a1afcc88a3e61e1.zip
Merge pull request #572 from lioncash/prototypes
core: Apply static to local functions
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r--src/core/core_timing.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index d96d3fe16..12ea3ff19 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -69,7 +69,7 @@ using AdvanceCallback = void(int cycles_executed);
69static AdvanceCallback* advance_callback = nullptr; 69static AdvanceCallback* advance_callback = nullptr;
70static std::vector<MHzChangeCallback> mhz_change_callbacks; 70static std::vector<MHzChangeCallback> mhz_change_callbacks;
71 71
72void FireMhzChange() { 72static void FireMhzChange() {
73 for (auto callback : mhz_change_callbacks) 73 for (auto callback : mhz_change_callbacks)
74 callback(); 74 callback();
75} 75}
@@ -97,7 +97,7 @@ u64 GetGlobalTimeUs() {
97 return last_global_time_us + us_since_last; 97 return last_global_time_us + us_since_last;
98} 98}
99 99
100Event* GetNewEvent() { 100static Event* GetNewEvent() {
101 if (!event_pool) 101 if (!event_pool)
102 return new Event; 102 return new Event;
103 103
@@ -106,7 +106,7 @@ Event* GetNewEvent() {
106 return event; 106 return event;
107} 107}
108 108
109Event* GetNewTsEvent() { 109static Event* GetNewTsEvent() {
110 allocated_ts_events++; 110 allocated_ts_events++;
111 111
112 if (!event_ts_pool) 112 if (!event_ts_pool)
@@ -117,12 +117,12 @@ Event* GetNewTsEvent() {
117 return event; 117 return event;
118} 118}
119 119
120void FreeEvent(Event* event) { 120static void FreeEvent(Event* event) {
121 event->next = event_pool; 121 event->next = event_pool;
122 event_pool = event; 122 event_pool = event;
123} 123}
124 124
125void FreeTsEvent(Event* event) { 125static void FreeTsEvent(Event* event) {
126 event->next = event_ts_pool; 126 event->next = event_ts_pool;
127 event_ts_pool = event; 127 event_ts_pool = event;
128 allocated_ts_events--; 128 allocated_ts_events--;
@@ -133,7 +133,7 @@ int RegisterEvent(const char* name, TimedCallback callback) {
133 return (int)event_types.size() - 1; 133 return (int)event_types.size() - 1;
134} 134}
135 135
136void AntiCrashCallback(u64 userdata, int cycles_late) { 136static void AntiCrashCallback(u64 userdata, int cycles_late) {
137 LOG_CRITICAL(Core_Timing, "Savestate broken: an unregistered event was called."); 137 LOG_CRITICAL(Core_Timing, "Savestate broken: an unregistered event was called.");
138 Core::Halt("invalid timing events"); 138 Core::Halt("invalid timing events");
139} 139}
@@ -228,7 +228,7 @@ void ClearPendingEvents() {
228 } 228 }
229} 229}
230 230
231void AddEventToQueue(Event* new_event) { 231static void AddEventToQueue(Event* new_event) {
232 Event* prev_event = nullptr; 232 Event* prev_event = nullptr;
233 Event** next_event = &first; 233 Event** next_event = &first;
234 for (;;) { 234 for (;;) {