Commit Graph

136 Commits

Author SHA1 Message Date
SciresM
e5c501e5b6 svc: Add all missing SVC stubs (#364) 2020-01-18 21:39:05 +01:00
fincs
ce394330a8
svcSignalProcessWideKey doesn't actually return anything 2019-12-18 00:40:27 +01:00
fincs
2f7d9bf026
Delete old IPC 🎉 2019-12-12 02:25:05 +01:00
SciresM
afe030f08b rwlock: revamp completely (#350)
Implements rwlockTryReadLock and rwlockTryWriteLock.
Also implements rwlockIsWriteLockHeldByCurrentThread and
rwlockIsOwnedByCurrentThread.

Also re-designs RwLock to have semantics identical to
Nintendo's (nn::os::ReaderWriterLock). The upshot is mostly
that the lock is now fully recursive/write-preferring.
2019-12-03 23:16:40 +01:00
yellows8
bcac85852a
Added InfoType_IsApplication. 2019-11-18 22:30:19 -05:00
Michael Scire
07ad046acf svc: change TitleId to ProgramId 2019-10-28 12:17:55 +01:00
SciresM
415adf5b93 threads: support using existing mem as stack (#336) 2019-10-19 04:25:23 +02:00
fincs
0a3592d4dd
Deprecate current IPC interface 2019-09-19 02:58:12 +02:00
yellows8
4177031ebe
Use the same style for all system-versions. 2019-08-26 13:05:49 -04:00
Robin Lambertz
37fdcb5726 svcGetInfo id0 should be an u32
svcGetInfo uses an u32 for id0 in the kernel (which moves W1 and not X1).
2019-08-09 21:18:57 +02:00
Michael Scire
a7522f1d4c Mark arguments to svcCreateProcess as const. 2019-06-28 02:35:44 +02:00
SciresM
e1a6a463c2 Add enums for GetInfo/GetSystemInfo (#292) 2019-06-22 00:05:56 +02:00
yellows8
836bb367aa
Renamed ipc_buffer_size to pointer_buffer_size for ipcAddSendSmart/ipcAddRecvSmart. 2019-05-11 11:17:33 -04:00
fincs
d911c47d2e Miscellaneous documentation fixes 2019-05-03 14:32:02 +02:00
Michael Scire
6b50fddd9b Implement svcQueryProcessMemory 2019-04-21 13:48:59 +02:00
Lioncash
896c81246e kernel/ipc: Resolve missing initializer warnings
In C++ projects with higher warning levels, this header can cause some
missing initializer warnings to leak over. This silences those from
occurring.
2019-04-16 00:54:20 +02:00
fincs
626b07fac8 Implement TLS slot support (with destructors) 2019-03-29 18:40:26 +01:00
plutoo
b7fe92f3a2 rwlock: Move over to condvar implementation. (#255)
This one is superior to the previous because it is write-preferring.
2019-03-28 23:53:04 +01:00
plutooo
e8f3964475 barrier: More efficient impl, maybe 2019-02-23 21:05:39 +01:00
Luke Street
1415df75e4 Update svcSleepThread definition 2019-02-19 18:18:50 -05:00
yellows8
567828f44e Fixed doxygen issues / improved docs. Closes #230. 2019-02-19 16:56:33 -05: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
ee2e19ce38 Improve names/documentation for jit kernel patch functions in detect.h/c + codestylefixes 2019-02-16 16:42:08 +01:00
plutooo
17731d750e Add function to test OFW behavior under CFW 2019-02-14 22:03:47 +01:00
plutooo
fc557cbf2a Detect and use the CFW jit patch. 2019-02-13 22:40:00 +01:00
fincs
252e8ef9ff Add tmemCreateFromMemory 2018-12-20 16:12:22 +01:00
yellows8
63e0e3502c Added eventActive(). 2018-12-19 12:56:01 -05:00
fincs
50d16023eb Fix typo 2018-12-17 16:18:28 +01:00
fincs
beeeb057d2 Finishing touches to user-mode synchronization primitives 2018-12-17 16:06:23 +01:00
fincs
8c786c610e Fix waitMulti/waitMultiHandle for C++ 2018-12-17 16:06:23 +01:00
fincs
21f69bfa57 Add, document, and use MAX_WAIT_OBJECTS 2018-12-17 16:06:23 +01:00
fincs
33dad9b893 UTimer: use an actual 'started' flag instead of a magic tick value 2018-12-17 16:06:23 +01:00
fincs
8d813ee666 Generalize Waitable, moving UEvent/UTimer specific code into a vtable. 2018-12-17 16:06:23 +01:00
fincs
a23d38ac77 Move waiterForXyz() functions to Xyz's header file. Implement waiter for (kernel mode) Event, and use it instead. 2018-12-17 16:06:23 +01:00
fincs
c9ee12ce20 Simplify WaiterNode, make it private. Improve UEvent autoclear logic. 2018-12-17 16:06:23 +01:00
fincs
2e76b2b150 waitN: Fix index bug when there are handles before UEvents in the array 2018-12-17 16:06:23 +01:00
fincs
9144d78031 Stylefixes, part 1 2018-12-17 16:06:23 +01:00
plutooo
eb7d835a79 wait: Rename UsermodeEvent and UsermodeTimer 2018-12-17 16:06:23 +01:00
plutooo
376add30a4 wait: Introduce wait for raw handles too 2018-12-17 16:06:23 +01:00
plutooo
68b4d323a0 utimer: Add TimerType_OneShot 2018-12-17 16:06:23 +01:00
plutooo
eb01ccd097 wait: Doxygen 2018-12-17 16:06:23 +01:00
plutooo
6a6f654526 wait: Final implementation 2018-12-17 16:06:23 +01:00
plutooo
26b17cdae5 kernel: Review comments (move to private interface to private headers, atomics) 2018-12-17 16:06:23 +01:00
plutooo
c6fc6a41e5 wait: Bug-fixes and lock-free utimer stop/start 2018-12-17 16:06:23 +01:00
plutooo
370d78453e kernel: Introduce utimer, uevent, and waitN 2018-12-17 16:06:23 +01:00
yellows8
3dce07d78c Fixed broken object sending in ipcPrepareHeaderForDomain(), and added serviceSendObject(). 2018-12-16 18:10:37 -05:00
plutooo
d3da66e418 Fix const specifier 2018-12-09 17:06:58 +01:00
Lioncash
69a98dc0cb kernel/svc: Correct SVC instruction values for svcMapPhysicalMemory and svcUnmapPhysicalMemory
0x2A corresponds to svcFlushEntireDataCache, while 0x2B corresponds to
svcFlushDataCache.
2018-12-07 12:19:16 +01:00
Michael Scire
40bccd7838 Add svcTerminateDebugProcess 2018-12-06 13:18:06 +01:00
yellows8
68846af044 Removed alignment for object_ids in ipcParseDomainResponse, since official sw doesn't have this. 2018-11-28 16:37:33 -05:00