Yuri Kunde Schlesner
6480d24a8c
Kernel: Start using boost::intrusive_ptr for lifetime management
2015-01-03 23:35:23 -02:00
Yuri Kunde Schlesner
934343368f
Thread: Mark file-private functions as static
2015-01-03 15:02:19 -02:00
Yuri Kunde Schlesner
1d1a55e63d
Thread: Remove some redundant functions
2015-01-03 15:02:19 -02:00
Yuri Kunde Schlesner
26f1524053
Thread: Remove orphan function declaration
2015-01-03 15:02:18 -02:00
Yuri Kunde Schlesner
c91d2e959b
Thread: Remove the last Handle-based interfaces from Thread.cpp
2015-01-03 15:02:18 -02:00
Yuri Kunde Schlesner
5619e790b8
Thread: Convert thread_ready_queue to pointers
2015-01-03 15:02:18 -02:00
Yuri Kunde Schlesner
0b64705384
Thread: Convert thread_queue to pointers
2015-01-03 15:02:17 -02:00
Yuri Kunde Schlesner
906da53958
Thread: Replace a for-loop with range-for
2015-01-03 15:02:17 -02:00
Yuri Kunde Schlesner
db0a526fbb
Thread: Convert wait_handle member to a pointer
2015-01-03 15:02:16 -02:00
Yuri Kunde Schlesner
5eb52c950d
Thread: Convert waiting_threads list from Handle to pointers
2015-01-03 15:02:16 -02:00
Yuri Kunde Schlesner
e19dc7e6f0
Thread: Remove unused static global
2015-01-03 15:02:16 -02:00
Yuri Kunde Schlesner
ce6b967f4e
Thread: Move ResumeThreadFromWait into member function
2015-01-03 15:02:15 -02:00
Yuri Kunde Schlesner
eae3d8e6d8
Thread: Move StopThread to a member function
2015-01-03 15:02:15 -02:00
Yuri Kunde Schlesner
4637df2721
Thread: Convert some uses of handles to pointers
2015-01-03 15:02:14 -02:00
Yuri Kunde Schlesner
333557152c
Thread: Move more helper functions into members
2015-01-03 15:02:14 -02:00
Yuri Kunde Schlesner
d1b7587647
Thread: Move Get/SetThreadPriority to be Thread members
2015-01-03 15:02:13 -02:00
Yuri Kunde Schlesner
ff992edecf
Thread: Move CreateThread into a static Kernel::Create function
2015-01-03 15:02:13 -02:00
Yuri Kunde Schlesner
3ac3803b92
Kernel: Move Thread's definition to the header file
2015-01-03 15:02:12 -02:00
Yuri Kunde Schlesner
4aa829b367
Move ThreadContext to core/core.h and deal with the fallout
2015-01-03 15:02:12 -02:00
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.
2014-12-28 11:52:55 -02:00
Yuri Kunde Schlesner
23f2142009
Kernel: Replace GetStaticHandleType by HANDLE_TYPE constants
2014-12-28 11:52:53 -02:00
Yuri Kunde Schlesner
73fba22c01
Rename ObjectPool to HandleTable
2014-12-28 11:52:52 -02:00
bunnei
0de6a08d75
Merge pull request #291 from purpasmart96/license
...
License change
2014-12-21 16:05:44 -05:00
purpasmart96
ebfd831ccb
License change
2014-12-20 21:20:24 -08:00
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
2014-12-20 23:20:19 -05:00
bunnei
2e5869c939
Merge pull request #316 from yuriks/thread-handle
...
Kernel: Implement support for current thread pseudo-handle
2014-12-20 16:36:01 -05:00
Chin
e795692614
Clean up some warnings
2014-12-20 10:03:36 -05:00
Yuri Kunde Schlesner
adee775f44
Kernel: Implement support for current thread pseudo-handle
...
This boots a few (mostly Nintendo 1st party) games further.
2014-12-20 03:27:47 -02:00
bunnei
7bae450379
Merge pull request #185 from purpasmart96/mem_perm
...
Kernel: Add missing permissions
2014-12-17 20:56:04 -05:00
Subv
ea9ce0fba7
Filesystem/Archives: Implemented the SaveData archive
...
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information
Got rid of the code duplication in File and Directory
Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive.
FS_U: Use the correct error code when a file wasn't found
2014-12-17 19:21:38 -05:00
Yuri Kunde Schlesner
ca67bb7945
HLE: Rename namespaces to match move & fix initialization order
2014-12-16 01:08:38 -02:00
Yuri Kunde Schlesner
c72ccfa6db
HLE: Move kernel/archive.* to service/fs/
2014-12-16 01:08:14 -02:00
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.)
2014-12-15 18:26:17 -02:00
Subv
ea95876431
Kernel/Semaphore: Small style change
2014-12-13 13:40:19 -05:00
Subv
effb181888
Kernel/Semaphores: Invert the available count checking.
...
Same semantics, idea by @yuriks
2014-12-13 13:40:18 -05:00
Subv
5e25986235
Kernel/Semaphores: Addressed some issues.
2014-12-13 13:40:16 -05:00
Subv
cc81a510e3
Semaphore: Removed an unneeded function
2014-12-13 13:40:15 -05:00
Subv
61434651d8
Semaphores: Addressed some style issues
2014-12-13 13:40:13 -05:00
Subv
abff4a7ee2
Semaphore: Implemented the initial_count parameter.
2014-12-13 13:40:12 -05:00
Subv
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
Subv
82c84883a5
SVC: Implemented svcCreateSemaphore
...
ToDo: Implement svcReleaseSemaphore
* Some testing against hardware needed
2014-12-13 13:40:09 -05:00
Lioncash
cfc0ee9c60
kernel: Remove unused log arguments
2014-12-13 10:15:58 -05:00
Yuri Kunde Schlesner
0600e2d8b5
Convert old logging calls to new logging macros
2014-12-13 02:08:02 -02:00
bunnei
3a75c8069e
Merge pull request #256 from Subv/mutex
...
Kernel/Mutex: Properly lock the mutex when a thread enters it
2014-12-10 22:52:55 -05:00
bunnei
dd203f7068
Thread: Fixed to wait on address when in arbitration.
2014-12-08 19:44:10 -05:00
archshift
20d2ed0950
Make OpenDirectory fail if the directory doesn't exist
...
This is in line with what the hardware itself does.
It does this by splitting the initial directory opening into Directory.Open(), which will return false if a stat fails.
Then, Archive::OpenDirectory will return nullptr, and archive.cpp will return an error code .
2014-12-07 14:47:14 -08:00
Subv
bc318c464b
Mutex: Remove some forward declarations
...
Moved Mutex::WaitSynchronization to the end of the file.
2014-12-07 15:57:28 -05:00
Subv
64128aa61a
Mutex: Release all held mutexes when a thread exits.
2014-12-07 15:44:21 -05:00
Subv
e3c8e4901c
Mutex: Properly lock the mutex when a thread enters it
...
Also resume only the next immediate thread waiting for the mutex when it is released, instead of resuming them all.
2014-12-05 23:40:43 -05:00
bunnei
17fae11fc7
Merge pull request #250 from Subv/cbranch_2
...
SVC: Implemented GetThreadId.
2014-12-04 22:15:03 -05:00