Commit Graph

29 Commits

Author SHA1 Message Date
e1fbac3ca1 Common: Remove common.h 2015-05-07 15:45:22 -03:00
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.
2015-02-10 18:30:31 -08:00
88a4a808c6 Kernel: Stop creating useless Handles during object creation
They're finally unnecessary, and will stop cluttering the application's
handle table.
2015-02-02 15:37:09 -02:00
7725256f64 Explicitly instantiate constructors/destructors for Kernel objects
This should speed up compile times a bit, as well as enable more liberal
use of forward declarations. (Due to SharedPtr not trying to emit the
destructor anymore.)
2015-02-02 15:37:07 -02:00
d9b19be1d9 Kernel: Convert Semaphore to not use Handles 2015-01-30 11:47:05 -02:00
f09806aed2 Kernel: Renamed some functions for clarity.
- ReleaseNextThread->WakeupNextThread
- ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
2015-01-21 20:48:30 -05:00
15b6a4d9ad Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void. 2015-01-21 20:47:49 -05:00
c68eb15695 WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual. 2015-01-21 20:47:49 -05:00
e5a9f1c644 Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks. 2015-01-21 20:47:38 -05:00
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
2015-01-21 19:11:47 -05:00
aa01c57ae9 Kernel: Separate WaitSynchronization into Wait and Acquire methods. 2015-01-21 19:10:24 -05:00
7faf2d8e06 WaitSynchronizationN: Implement return values 2015-01-21 19:09:03 -05:00
c22bac6398 Kernel: Added WaitObject and changed "waitable" objects inherit from it. 2015-01-21 18:41:00 -05:00
8ad41775cc Kernel: Start using boost::intrusive_ptr for lifetime management 2015-01-09 19:43:52 -02:00
9bf8462b96 Thread: Reduce use of Handles and move some funcs to inside the class. 2015-01-09 04:02:15 -02:00
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.
2014-12-28 11:52:55 -02:00
23f2142009 Kernel: Replace GetStaticHandleType by HANDLE_TYPE constants 2014-12-28 11:52:53 -02:00
73fba22c01 Rename ObjectPool to HandleTable 2014-12-28 11:52:52 -02:00
0de6a08d75 Merge pull request #291 from purpasmart96/license
License change
2014-12-21 16:05:44 -05:00
ebfd831ccb License change 2014-12-20 21:20:24 -08:00
e795692614 Clean up some warnings 2014-12-20 10:03:36 -05:00
ea95876431 Kernel/Semaphore: Small style change 2014-12-13 13:40:19 -05:00
effb181888 Kernel/Semaphores: Invert the available count checking.
Same semantics, idea by @yuriks
2014-12-13 13:40:18 -05:00
5e25986235 Kernel/Semaphores: Addressed some issues. 2014-12-13 13:40:16 -05:00
cc81a510e3 Semaphore: Removed an unneeded function 2014-12-13 13:40:15 -05:00
61434651d8 Semaphores: Addressed some style issues 2014-12-13 13:40:13 -05:00
abff4a7ee2 Semaphore: Implemented the initial_count parameter. 2014-12-13 13:40:12 -05:00
49b31badba SVC: Implemented ReleaseSemaphore.
This behavior was tested on hardware, however i'm still not sure what use the "initial_count" parameter has
2014-12-13 13:40:10 -05:00
82c84883a5 SVC: Implemented svcCreateSemaphore
ToDo: Implement svcReleaseSemaphore
* Some testing against hardware needed
2014-12-13 13:40:09 -05:00