Commit Graph

31 Commits (d7cd316a6c8e2438a19fc685707ea333ca6fe0db)

Author SHA1 Message Date
bunnei 2a7eff57a8 hle: kernel: Rename Process to KProcess. 4 years ago
Lioncash 724c19a307 loader: Resolve instances of variable shadowing
Eliminates variable shadowing cases across all the loaders to bring us
closer to enabling variable shadowing as an error in core.
4 years ago
Lioncash b1657b8c6b vfs: Use existing type aliases consistently
Makes use of the VirtualDir and VirtualFile aliases across the board
instead of having a few isolated places that don't use it.
4 years ago
Lioncash 113a3972a6 core/loader: Remove dependencies on the global system instance
Now all that remains is:

18 instances in file_sys code
14 instances in GDB stub code (this can be tossed wholesale)
4 instances in HLE code
2 instances in settings code.
5 years ago
Lioncash 612e1388df core/core: Move process execution start to System's Load()
This gives us significantly more control over where in the
initialization process we start execution of the main process.

Previously we were running the main process before the CPU or GPU
threads were initialized (not good). This amends execution to start
after all of our threads are properly set up.
6 years ago
Lioncash de323851b4 loaders: Make GetFileType() a const qualified member function
No implementations actually modify instance state (and it would be
questionable to do that in the first place given the name), so we can
make this a const member function.
6 years ago
Lioncash a63e6f9dfd loader: Make the Load() function take a process as a regular reference, not a SharedPtr
A process should never require being reference counted in this
situation. If the handle to a process is freed before this function is
called, it's definitely a bug with our lifetime management, so we can
put the requirement in place for the API that the process must be a
valid instance.
7 years ago
Zach Hilman 29aff8d5ab Virtual Filesystem 2: Electric Boogaloo (#676)
* Virtual Filesystem

* Fix delete bug and documentate

* Review fixes + other stuff

* Fix puyo regression
7 years ago
bunnei 913896cbd9 Revert "Virtual Filesystem (#597)"
This reverts commit 77c684c114.
7 years ago
Zach Hilman 77c684c114 Virtual Filesystem (#597)
* Add VfsFile and VfsDirectory classes

* Finish abstract Vfs classes

* Implement RealVfsFile (computer fs backend)

* Finish RealVfsFile and RealVfsDirectory

* Finished OffsetVfsFile

* More changes

* Fix import paths

* Major refactor

* Remove double const

* Use experimental/filesystem or filesystem depending on compiler

* Port partition_filesystem

* More changes

* More Overhaul

* FSP_SRV fixes

* Fixes and testing

* Try to get filesystem to compile

* Filesystem on linux

* Remove std::filesystem and document/test

* Compile fixes

* Missing include

* Bug fixes

* Fixes

* Rename v_file and v_dir

* clang-format fix

* Rename NGLOG_* to LOG_*

* Most review changes

* Fix TODO

* Guess 'main' to be Directory by filename
7 years ago
bunnei 386df282a3 loader: Clean up ctors and includes. 7 years ago
bunnei 023aef053c loader: Refactor to also pass filepath into IdentifyType. 7 years ago
Subv 7f48aa8d25 Loaders: Don't automatically set the current process every time we load an application.
The loaders will now just create a Kernel::Process, construct it and return it to the caller, which is responsible for setting it as the current process and configuring the global page table.
8 years ago
bunnei 81e22ae8c7 loader: Remove duplicate docstrings. 8 years ago
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format 9 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 9 years ago
Emmanuel Gil Peyrot 9a35d1fb4a Loader: Add a GetFileType method to get the type of a loaded file 9 years ago
Yuri Kunde Schlesner 2d7299a86f Loader: Remove unnecessary pointer indirection to IOFile 10 years ago
Yuri Kunde Schlesner 6d60acf0f1 Kernel: Introduce skeleton Process class to hold process data 10 years ago
Emmanuel Gil Peyrot 82ec17db7d Loader: Guess filetype from the magic, or fallback to the extension. 10 years ago
Emmanuel Gil Peyrot b5237e885d Loader: Keep a reference to the file and pass it to the correct AppLoader, instead of loading it multiple times. 10 years ago
Emmanuel Gil Peyrot 85030c6e6b Loader: Never forget to change is_loaded. 10 years ago
purpasmart96 ebfd831ccb License change 10 years ago
bunnei 1099d83455 Marked AppLoader_ELF, AppLoader_NCCH, and Archive_RomFS virtual functions as "override". 11 years ago
bunnei 2d734bb6c5 Marked AppLoader_ELF, AppLoader_NCCH, and Archive_RomFS classes as "final" 11 years ago
bunnei 62b444cd17 Loader: Refactored use of const. 11 years ago
bunnei 7889cafc76 Loader: Implemented AppLoader interface for abstracting application loading.
- Various cleanups/refactorings to Loader, ELF, and NCCH modules.
- Added AppLoader interface to ELF and NCCH.
- Updated Qt/GLFW frontends to check AppLoader ResultStatus.

NCCH: Removed extra qualification typos.

Loader: Removed unnecessary #include's.

NCCH: Improved readability of memcmp statements.

NCCH: Added missing space.

Elf: Removed unnecessary usage of unique_ptr.

Loader: Removed unnecessary usage of unique_ptr.
11 years ago
bunnei c144ed5058 Elf: Removed unused macros, changed #include of "common.h" to just "common_types.h". 11 years ago
bunnei 13bdaa6c60 Loader: Cleaned up and removed unused code, refactored ELF namespace. 11 years ago
bunnei 1da361c7ab Elf: Renamed modules to be consistent with new loader naming, fixed tabs -> spaces. 11 years ago