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
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
627e96fc15
WaitSynchronizationN: Handle case where handles=nullptr.
11 years ago
bunnei
f5c6d367c9
WaitSynchronizationN: Handle case where handle_count is invalid.
11 years ago
bunnei
064be2b86f
WaitSynchronizationN: Handle case where handle_count=0.
11 years ago
bunnei
7faf2d8e06
WaitSynchronizationN: Implement return values
11 years ago
Subv
9e2ae289b8
AddrArbiter: Implement arbitration types 3 and 4.
11 years ago
Subv
38da198aa1
SVC: Wake up the thread after the delay in WaitSync1
11 years ago
archshift
228843c43e
Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance.
11 years ago
Yuri Kunde Schlesner
8ad41775cc
Kernel: Start using boost::intrusive_ptr for lifetime management
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
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
Kevin Hartman
63be6aaadd
Warn if a new thread is intended to be run on the system CPU core until we implement correct scheduling for such a thread.
11 years ago
Subv
97a7381d29
SOC_U: Preliminary implementation of sockets.
Stubbed CreateMemoryBlock
Using Berkeley sockets, and Winsock2.2 on Windows.
So far ftpony creates the socket and accepts incoming connections
SOC_U: Renamed functions to maintain consistency
Also prevents possible scope errors / conflicts with the actual Berkeley socket functions
SOCU: Close all the opened sockets when cleaning up SOCU
11 years ago
Yuri Kunde Schlesner
7e2903cb74
Kernel: New handle manager
This handle manager more closely mirrors the behaviour of the CTR-OS
one. In addition object ref-counts and support for DuplicateHandle have
been added.
Note that support for DuplicateHandle is still experimental, since parts
of the kernel still use Handles internally, which will likely cause
troubles if two different handles to the same object are used to e.g.
wait on a synchronization primitive.
11 years ago
Yuri Kunde Schlesner
73fba22c01
Rename ObjectPool to HandleTable
11 years ago
purpasmart96
ebfd831ccb
License change
11 years ago
bunnei
4fcdbed9f6
Thread: Wait current thread on svc_SleepThread
- Removed unused VBLANK sleep mode
- Added error log for bad context switch
- Renamed VerifyWait to CheckWaitType to be more clear
11 years ago
Yuri Kunde Schlesner
e321decf98
Remove SyncRequest from K::Object and create a new K::Session type
This is a first step at fixing the conceptual insanity that is our
handling of service and IPC calls. For now, interfaces still directly
derived from Session because we don't have the infrastructure to do it
properly. (That is, Processes and scheduling them.)
11 years ago
Subv
1051795c32
Kernel/Semaphores: Fixed build
11 years ago
Subv
49b31badba
SVC: Implemented ReleaseSemaphore.
This behavior was tested on hardware, however i'm still not sure what use the "initial_count" parameter has
11 years ago
Subv
82c84883a5
SVC: Implemented svcCreateSemaphore
ToDo: Implement svcReleaseSemaphore
* Some testing against hardware needed
11 years ago
Yuri Kunde Schlesner
0600e2d8b5
Convert old logging calls to new logging macros
11 years ago