mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 02:51:03 +00:00
Thread: Mark file-private functions as static
This commit is contained in:
parent
1d1a55e63d
commit
934343368f
@ -50,7 +50,7 @@ Thread* GetCurrentThread() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Resets a thread
|
/// Resets a thread
|
||||||
void ResetThread(Thread* t, u32 arg, s32 lowest_priority) {
|
static void ResetThread(Thread* t, u32 arg, s32 lowest_priority) {
|
||||||
memset(&t->context, 0, sizeof(Core::ThreadContext));
|
memset(&t->context, 0, sizeof(Core::ThreadContext));
|
||||||
|
|
||||||
t->context.cpu_registers[0] = arg;
|
t->context.cpu_registers[0] = arg;
|
||||||
@ -72,7 +72,7 @@ void ResetThread(Thread* t, u32 arg, s32 lowest_priority) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Change a thread to "ready" state
|
/// Change a thread to "ready" state
|
||||||
void ChangeReadyState(Thread* t, bool ready) {
|
static void ChangeReadyState(Thread* t, bool ready) {
|
||||||
if (t->IsReady()) {
|
if (t->IsReady()) {
|
||||||
if (!ready) {
|
if (!ready) {
|
||||||
thread_ready_queue.remove(t->current_priority, t);
|
thread_ready_queue.remove(t->current_priority, t);
|
||||||
@ -122,7 +122,7 @@ void Thread::Stop(const char* reason) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Changes a threads state
|
/// Changes a threads state
|
||||||
void ChangeThreadState(Thread* t, ThreadStatus new_status) {
|
static void ChangeThreadState(Thread* t, ThreadStatus new_status) {
|
||||||
if (!t || t->status == new_status) {
|
if (!t || t->status == new_status) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ void ArbitrateAllThreads(Object* arbiter, u32 address) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Calls a thread by marking it as "ready" (note: will not actually execute until current thread yields)
|
/// Calls a thread by marking it as "ready" (note: will not actually execute until current thread yields)
|
||||||
void CallThread(Thread* t) {
|
static void CallThread(Thread* t) {
|
||||||
// Stop waiting
|
// Stop waiting
|
||||||
if (t->wait_type != WAITTYPE_NONE) {
|
if (t->wait_type != WAITTYPE_NONE) {
|
||||||
t->wait_type = WAITTYPE_NONE;
|
t->wait_type = WAITTYPE_NONE;
|
||||||
@ -183,7 +183,7 @@ void CallThread(Thread* t) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Switches CPU context to that of the specified thread
|
/// Switches CPU context to that of the specified thread
|
||||||
void SwitchContext(Thread* t) {
|
static void SwitchContext(Thread* t) {
|
||||||
Thread* cur = GetCurrentThread();
|
Thread* cur = GetCurrentThread();
|
||||||
|
|
||||||
// Save context for current thread
|
// Save context for current thread
|
||||||
@ -207,7 +207,7 @@ void SwitchContext(Thread* t) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the next thread that is ready to be run by priority
|
/// Gets the next thread that is ready to be run by priority
|
||||||
Thread* NextThread() {
|
static Thread* NextThread() {
|
||||||
Thread* next;
|
Thread* next;
|
||||||
Thread* cur = GetCurrentThread();
|
Thread* cur = GetCurrentThread();
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ void Thread::ResumeFromWait() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Prints the thread queue for debugging purposes
|
/// Prints the thread queue for debugging purposes
|
||||||
void DebugThreadQueue() {
|
static void DebugThreadQueue() {
|
||||||
Thread* thread = GetCurrentThread();
|
Thread* thread = GetCurrentThread();
|
||||||
if (!thread) {
|
if (!thread) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user