Yuri Kunde Schlesner
ec9c773251
Kernel: Remove previous scheduled event when a Timer is re-Set
11 years ago
Yuri Kunde Schlesner
664c79ff47
Thread: Modernize two functions that slipped through previous rebases
11 years ago
Lioncash
3f00dd9117
arm: Clean up ARMul_State
Remove unnecessary/unused struct variables.
11 years ago
Lioncash
96c174aed4
shared_memory: Fix assignments in SharedMemory::Map
11 years ago
Yuri Kunde Schlesner
d917a9bf77
Kernel: Mark all appropriate kernel objects as "final"
11 years ago
Yuri Kunde Schlesner
09ae6e1fa3
Remove result.h InvalidHandle
It was only being used in two places, where it was replaced by a local
constant.
11 years ago
Yuri Kunde Schlesner
d52d859936
Kernel: Convert Event to not use Handles
11 years ago
Yuri Kunde Schlesner
ad80ff1e32
Kernel: Convert Timer to (mostly) not use Handles
11 years ago
Yuri Kunde Schlesner
882b6fed75
Kernel: Convert Mutex to not use Handles
11 years ago
Yuri Kunde Schlesner
38e7122f23
Kernel: Convert AddressArbiter to not use Handles
11 years ago
Yuri Kunde Schlesner
d9b19be1d9
Kernel: Convert Semaphore to not use Handles
11 years ago
Yuri Kunde Schlesner
4bb33dfc30
Kernel: Convert SharedMemory to not use Handles
11 years ago
Yuri Kunde Schlesner
b5ee4f9df9
Move VAddr/PAddr typedefs to kernel.h
11 years ago
Yuri Kunde Schlesner
9a345de2bd
Kernel: Remove useless/duplicated comments; mark functions static
11 years ago
bunnei
68ddaaa2f5
Thread: Fix WaitSynchronization1 to not set register 1 on thread wakeup.
11 years ago
bunnei
4255f25647
Thread: Use std::find in CheckWait_WaitObject.
11 years ago
bunnei
2f3020a102
Mutex: Cleanup and remove redundant code.
11 years ago
bunnei
f09806aed2
Kernel: Renamed some functions for clarity.
- ReleaseNextThread->WakeupNextThread
- ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
11 years ago
bunnei
15b6a4d9ad
Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void.
11 years ago
bunnei
c68eb15695
WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual.
11 years ago
bunnei
69c5830ef2
Event: Fix implementation of "non-sticky" events.
11 years ago
bunnei
9e6ec3b6cd
Session: Change to a WaitObject.
11 years ago
bunnei
d2759c578e
Kernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs.
11 years ago
bunnei
dde02f79af
Mutex: Fix a bug where the thread should not wait if it already has the mutex.
11 years ago
bunnei
9412996c8f
Kernel: Moved Wait and Acquire to WaitObject, added way to retrieve a WaitObject safely.
11 years ago
bunnei
254e4ebd58
AddressArbiter: Changed to Kernel::Object, big cleanup, removed code that made no sense.
11 years ago
bunnei
e5a9f1c644
Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.
11 years ago
bunnei
6643673f28
WaitSynchronizationN: Refactor to fix several bugs
- Separate wait checking from waiting the current thread
- Resume thread when wait_all=true only if all objects are available at once
- Set output to correct wait object index when there are duplicate handles
11 years ago
bunnei
aa01c57ae9
Kernel: Separate WaitSynchronization into Wait and Acquire methods.
11 years ago
bunnei
7faf2d8e06
WaitSynchronizationN: Implement return values
11 years ago
bunnei
e4a5d8ad4f
Event: Fixed some bugs and cleanup (Subv)
11 years ago
bunnei
1f7a04f05a
Thread: Keep track of multiple wait objects.
11 years ago
bunnei
14cbbf4d9b
Event: Get rid of permanent_lock hack.
11 years ago
bunnei
5e77e2e1de
WaitObject: Added RemoveWaitingThread, fixed a bug, and cleanup.
11 years ago
bunnei
c22bac6398
Kernel: Added WaitObject and changed "waitable" objects inherit from it.
11 years ago
Lioncash
a3f5e5605c
core: Fix a few docstrings
11 years ago
Subv
9e2ae289b8
AddrArbiter: Implement arbitration types 3 and 4.
11 years ago
Subv
b68d51ed30
Thread: Prevent waking a thread multiple times.
If a thread was woken up by something, cancel the wakeup timeout.
11 years ago
Yuri Kunde Schlesner
8ad41775cc
Kernel: Start using boost::intrusive_ptr for lifetime management
11 years ago
Yuri Kunde Schlesner
d751de7341
Kernel: Don't re-assign object's handle when duplicating one
11 years ago
Yuri Kunde Schlesner
78ea76e12f
Thread: Fix nullptr access in a logging function
11 years ago
Yuri Kunde Schlesner
7f1557fbbd
Thread: Rename thread_queue => thread_list
11 years ago
Yuri Kunde Schlesner
9bf8462b96
Thread: Reduce use of Handles and move some funcs to inside the class.
11 years ago
Yuri Kunde Schlesner
ba72208cd4
Kernel: Move Thread's definition to the header file
11 years ago
Yuri Kunde Schlesner
7b3452c730
Move ThreadContext to core/core.h and deal with the fallout
11 years ago
Subv
07044651ef
SVC: Implemented the Timer service calls.
11 years ago
Subv
dfc440785a
SVC: Fixed SleepThread.
It will now properly wait the specified number of nanoseconds and then wake up the thread.
11 years ago
Subv
60a373a786
Threads: Use a dummy idle thread when no other are ready.
This thread will not actually execute instructions, it will only advance the timing/events and try to yield immediately to the next ready thread, if there aren't any ready threads then it will be rescheduled and start its job again.
11 years ago
Yuri Kunde Schlesner
122c2bb324
Common: Clean up ThreadQueueList
Replace all the C-style complicated buffer management with a std::deque.
In addition to making the code easier to understand it also adds support
for non-POD IdTypes.
Also clean the rest of the code to follow our code style.
11 years ago
Subv
ea80363cc2
Mutex: Add the calling thread to the waiting list when needed
This will happen when the mutex is already owned by another thread. Should fix some issues with games being stuck due to waiting threads not being awoken.
11 years ago