Yuri Kunde Schlesner
8850ade24d
Kernel: Properly implement ControlMemory FREE and COMMIT
11 years ago
Lioncash
c2689b8c2c
dyncom: Pass SVC immediates directly.
Previously it would just re-read the already decoded instruction and extract the immediate value.
11 years ago
Subv
83fa3f977d
Kernel/SVC: Implemented svcQueryProcessMemory
11 years ago
Subv
9e2962081a
Kernel/SVC: Implemented svcQueryMemory.
11 years ago
zawata
f723a498e7
Core\HLE : Fix Warning
"signed/unsigned mismatch"
11 years ago
bunnei
71e8822d23
kernel: Fix svcWaitSynch to always acquire requested wait objects.
11 years ago
Emmanuel Gil Peyrot
b1503b2020
Remove every trailing whitespace from the project (but externals).
11 years ago
Subv
732839b1f4
Core/SVC: Map the shared memory created in CreateMemoryBlock to the specified address.
This SharedMemory can be passed to service functions (Which should map the memory into their own address space).
11 years ago
bunnei
0b7d2941cf
Kernel: Move reschedules from SVCs to actual mechanisms that reschedule.
11 years ago
archshift
11057488f9
Implement svcBreak
11 years ago
Subv
d3634d4bf4
Core/ResourceLimits: Implemented the basic structure of ResourceLimits.
Implemented svcs GetResourceLimit, GetResourceLimitCurrentValues and GetResourceLimitLimitValues.
Note that the resource limits do not currently keep track of used objects, since we have no way to distinguish between an object created by the application, and an object created by some HLE module once we're inside Kernel::T::Create.
11 years ago
Yuri Kunde Schlesner
7ada357b2d
Memmap: Re-organize memory function in two files
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
11 years ago
Subv
25c010dc7d
fixup!
11 years ago
Subv
41f74a16fd
Core/HLE: Implemented the SVCs GetProcessId and GetProcessIdOfThread
11 years ago
Yuri Kunde Schlesner
c96f22490a
Kernel: Capture SharedMemory attributes at creation, not when mapping
11 years ago
Yuri Kunde Schlesner
c956e8a686
Fix printf format warning
11 years ago
Yuri Kunde Schlesner
e1fbac3ca1
Common: Remove common.h
11 years ago
Yuri Kunde Schlesner
ecff2351a1
HLE: Clean up SVC dispatch mechanism
11 years ago
bunnei
db4bd98bac
SVC: Assert on unsupported CreateThread processor ID.
11 years ago
bunnei
c077bcefa9
SVC: Update various SVCs to cause a reschedule.
- CreateMutex/ReleaseMutex/ReleaseSemaphore/SetTimer/CancelTimer/ArbitrateAddress
11 years ago
bunnei
7b9f428b23
Thread: Implement priority boost for starved threads.
SVC: Return correct error code on invalid CreateThread processor ID.
SVC: Assert when creating a thread with an invalid userland priority.
11 years ago
bunnei
ee3377b67d
SVC: Reschedule on svcCreateThread.
11 years ago
Lioncash
8cf81643a9
arm_interface: Get rid of GetTicks.
Removes a TODO.
11 years ago
archshift
ef24e72b26
Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
11 years ago
Kevin Hartman
5fcbfc06eb
Scheduler refactor Pt. 1
* Simplifies scheduling logic, specifically regarding thread status. It should be much clearer which statuses are valid
for a thread at any given point in the system.
* Removes dead code from thread.cpp.
* Moves the implementation of resetting a ThreadContext to the corresponding core's implementation.
Other changes:
* Fixed comments in arm interfaces.
* Updated comments in thread.cpp
* Removed confusing, useless, functions like MakeReady() and ChangeStatus() from thread.cpp.
* Removed stack_size from Thread. In the CTR kernel, the thread's stack would be allocated before thread creation.
11 years ago
bunnei
caa58acc84
WaitSynch: Always reschedule (verified behavior on hw).
11 years ago
Yuri Kunde Schlesner
88a4a808c6
Kernel: Stop creating useless Handles during object creation
They're finally unnecessary, and will stop cluttering the application's
handle table.
11 years ago
Yuri Kunde Schlesner
c4208c1171
SVC: Enable CloseHandle, clean up DuplicateHandle
11 years ago
Yuri Kunde Schlesner
664c79ff47
Thread: Modernize two functions that slipped through previous rebases
11 years ago
Yuri Kunde Schlesner
8779b31fe6
Make Port/Service registration and querying more HW-accurate
11 years ago
Yuri Kunde Schlesner
58b544db99
SVC: Use CASCADE_RESULT in SVC handlers
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
44f90340dc
SVC: Change return type of handlers to ResultCode
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
purpasmart96
62f4365db1
SVC: Update the SVC function table
11 years ago
bunnei
731154f79e
WaitSynchronization: Added a result code for invalid result, fixed bug.
11 years ago
bunnei
68ddaaa2f5
Thread: Fix WaitSynchronization1 to not set register 1 on thread wakeup.
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
d2759c578e
Kernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs.
11 years ago
bunnei
9412996c8f
Kernel: Moved Wait and Acquire to WaitObject, added way to retrieve a WaitObject safely.
11 years ago
bunnei
c06d64528a
SVC: Removed a Sleep that made no sense
- Would deadlock the calling thread
- Code would never get hit anyways
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
6deb1a0119
WaitSynchronizationN: Improved comments
11 years ago