Commit Graph

32 Commits

Author SHA1 Message Date
Ghabry
a215ae2da2 Add NX_ prefix to PACKED, NORETURN, IGNORE_ARG and DEPRECATED macros 2023-11-20 19:22:12 +01:00
fincs
970d982e57
Add diagAbortWithResult, see details:
- This is a (weak/overridable) function meant to be called when the
  program encounters an unrecoverable error, but it's not fatal enough
  to bring down the entire system with it.
- The default implementation uses svcBreak, passing the result code
  in the user buffer.
- Replaced all usages of fatalThrow with diagAbortWithResult throughout
  the entire library.
2020-10-29 13:40:35 +01:00
fincs
e655b48c41
crt0: clean up/refactor; envSetup: properly detect NSO/NRO environment... 2020-10-27 12:27:32 +01:00
SciresM
4746827513
thread: add threadGetSelf(), add main thread to thread list. (#392) 2020-04-07 01:47:06 +02:00
fincs
4ab2384449
fatal: Rename functions/types to match official names more closely 2019-10-24 23:25:07 +02:00
fincs
c77b88d868
Major cleanup and refactor of fsdev and romfsdev, see details:
fsdev:
- Removed fsdevGetDefaultFileSystem and default-fs handling
- Refactored CWD support to have (dynamically allocated) per-device CWDs
  (CWD support as a whole can be turned off with __nx_fsdev_support_cwd)
- Optimized calls by passing pointer to device through r->deviceData
- Use the per-thread path buffer directly as the argument to FS functions
- Removed redundant cross-device check in fsdev_rename
- Fixed string comparison logic in fsdevFindDevice
- fsdev_fixpath now accepts an input device in order to skip device
  lookup (extensively used along with r->deviceData)
- Mounting a filesystem now automatically sets the default device
  if there wasn't any previous default device (or if it's stdnull)
- fsdevMountSdmc no longer sets cwd to the folder containing the
  executable - this logic was moved to a new internal function
  called on startup by default (and it is now disabled for NSOs)
- Other miscellaneous optimizations

romfsdev:
- Cleaned up romfsMount* functions, removed unused/unnecessary logic
- Changed romfsMount* functions to return real result codes
- Renamed romfsMount to romfsMountSelf and improved documentation
- Removed romfsInitFromFile and romfsInitFromStorage (use Mount instead)
- Added documentation for romfsInit and romfsExit
2019-10-20 22:22:04 +02:00
fincs
01d648e7ed Add support for new homebrew ABI keys + loader info 2019-07-29 21:17:09 +02:00
SciresM
e1a6a463c2 Add enums for GetInfo/GetSystemInfo (#292) 2019-06-22 00:05:56 +02:00
fincs
61cc738730 Introduce hosversion.h - HOS version detection utilities
- Simplify kernel/detect.h logic; introduce detectKernelVersion()
- Use set:sys (if available) during __appInit in order to initialize
  the current HOS version
2019-02-18 21:48:41 +01:00
fincs
3a77a7ace8 Introduce nwindowGetDefault 2018-12-19 19:33:31 +01:00
yellows8
12ee6e502e Fixed register corruption in crt0 introduced by the exception commit. Only handle exceptions when __libnx_exception_handler is defined by the user, and updated comments. 2018-11-14 20:55:17 -05:00
yellows8
5e69f760fb Added support for exception-handling. 2018-11-14 16:17:02 -05:00
Dave Murphy
35be7ac772 allow user additions to init/exit code (#124)
* allow user additions to init/exit code
2018-06-25 12:42:52 -04:00
Dave Murphy
3326d5e62d Time fixes (#102)
* provide microseconds to gettimeofday
* implement clock functions
2018-06-07 15:35:41 -04:00
fincs
2818c99dea Revise fsdev initialization, see details:
- Removed fsdevInit/Exit
- Now automatically initializing fsdev state on first mount
- Added fsdevMountSdmc (replaces fsdevInit)
- Added fsdevUnmountAll (replaces fsdevExit)
2018-05-01 19:06:14 +02:00
yellows8
14263ddd78 Initial time support, timezones are not handled yet. 2018-02-20 18:17:32 -05:00
yellows8
4137f9aefe Allocate heap with the size determined via svcGetInfo by default. Updated heap comments. 2018-02-05 22:21:44 -05:00
TuxSH
e7c57fbd0b Fix 85d7ac4 2018-01-31 01:44:30 +01:00
TuxSH
85d7ac4da1 Restore initial sp on application exit 2018-01-31 01:14:48 +01:00
yellows8
e1347f367c Enabled code which requires devkitA64 a6. 2018-01-25 22:16:14 -05:00
yellows8
e39dc2baf8 Fixed building when fsdev usage is enabled. 2018-01-24 16:05:47 -05:00
plutoo
6fa8370bfb This looks better 2018-01-22 20:11:55 +01:00
TuxSH
5abc4873d8 Include only what is really necessary...
add pragma once in every header, etc.
2018-01-22 18:42:57 +01:00
plutoo
e54bbc54ea Fix codestyle for results 2018-01-21 18:40:23 +01:00
plutoo
d4db5b7647 Stylefix 2018-01-20 19:37:11 +01:00
plutoo
8ae150d110 NRO loading bringup 2018-01-20 00:13:38 +01:00
yellows8
e3f0e08a90 Skip HID init when applet-type is None. 2018-01-17 00:39:56 -05:00
plutoo
844f72fe67 Panic if any initialization fails 2018-01-13 00:43:38 +01:00
plutoo
efc7cbf653 Implement heap override 2018-01-12 19:10:46 +01:00
plutoo
6720355dd1 Bringup loader config block parsing
Not tested yet
2018-01-11 22:59:40 +01:00
plutoo
edcf789b6e C was developed in 1972 2018-01-06 13:54:59 +01:00
plutoo
cac3f735af Renamed misleading dir names "devices/" and "system/" to "runtime/" 2018-01-06 13:45:37 +01:00