mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 18:50:05 +00:00
kernel: Various threading fixes to support 64-bit addressing.
This commit is contained in:
parent
f01472a5ff
commit
c5ce5c06e4
@ -341,8 +341,8 @@ std::tuple<u32, u32, bool> GetFreeThreadLocalSlot(std::vector<std::bitset<8>>& t
|
|||||||
* @param entry_point Address of entry point for execution
|
* @param entry_point Address of entry point for execution
|
||||||
* @param arg User argument for thread
|
* @param arg User argument for thread
|
||||||
*/
|
*/
|
||||||
static void ResetThreadContext(ARM_Interface::ThreadContext& context, u32 stack_top,
|
static void ResetThreadContext(ARM_Interface::ThreadContext& context, VAddr stack_top,
|
||||||
u32 entry_point, u32 arg) {
|
VAddr entry_point, u64 arg) {
|
||||||
memset(&context, 0, sizeof(ARM_Interface::ThreadContext));
|
memset(&context, 0, sizeof(ARM_Interface::ThreadContext));
|
||||||
|
|
||||||
context.cpu_registers[0] = arg;
|
context.cpu_registers[0] = arg;
|
||||||
@ -477,7 +477,7 @@ void Thread::BoostPriority(s32 priority) {
|
|||||||
current_priority = priority;
|
current_priority = priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority) {
|
SharedPtr<Thread> SetupMainThread(VAddr entry_point, s32 priority) {
|
||||||
DEBUG_ASSERT(!GetCurrentThread());
|
DEBUG_ASSERT(!GetCurrentThread());
|
||||||
|
|
||||||
// Initialize new "main" thread
|
// Initialize new "main" thread
|
||||||
|
@ -171,8 +171,8 @@ public:
|
|||||||
u32 thread_id;
|
u32 thread_id;
|
||||||
|
|
||||||
u32 status;
|
u32 status;
|
||||||
u32 entry_point;
|
VAddr entry_point;
|
||||||
u32 stack_top;
|
VAddr stack_top;
|
||||||
|
|
||||||
s32 nominal_priority; ///< Nominal thread priority, as set by the emulated application
|
s32 nominal_priority; ///< Nominal thread priority, as set by the emulated application
|
||||||
s32 current_priority; ///< Current thread priority, can be temporarily changed
|
s32 current_priority; ///< Current thread priority, can be temporarily changed
|
||||||
@ -216,7 +216,7 @@ private:
|
|||||||
* @param priority The priority to give the main thread
|
* @param priority The priority to give the main thread
|
||||||
* @return A shared pointer to the main thread
|
* @return A shared pointer to the main thread
|
||||||
*/
|
*/
|
||||||
SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority);
|
SharedPtr<Thread> SetupMainThread(VAddr entry_point, s32 priority);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether there are any threads that are ready to run.
|
* Returns whether there are any threads that are ready to run.
|
||||||
@ -232,13 +232,13 @@ void Reschedule();
|
|||||||
* Arbitrate the highest priority thread that is waiting
|
* Arbitrate the highest priority thread that is waiting
|
||||||
* @param address The address for which waiting threads should be arbitrated
|
* @param address The address for which waiting threads should be arbitrated
|
||||||
*/
|
*/
|
||||||
Thread* ArbitrateHighestPriorityThread(u32 address);
|
Thread* ArbitrateHighestPriorityThread(VAddr address);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Arbitrate all threads currently waiting.
|
* Arbitrate all threads currently waiting.
|
||||||
* @param address The address for which waiting threads should be arbitrated
|
* @param address The address for which waiting threads should be arbitrated
|
||||||
*/
|
*/
|
||||||
void ArbitrateAllThreads(u32 address);
|
void ArbitrateAllThreads(VAddr address);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current thread
|
* Gets the current thread
|
||||||
|
Loading…
Reference in New Issue
Block a user