Commit graph

37 commits

Author SHA1 Message Date
Michael Scire
bbf22b4c60 ams: globally prefer R_RETURN to return for ams::Result 2022-03-26 14:48:33 -07:00
Michael Scire
dd78ede99f ams: use R_SUCCEED, R_THROW globally 2022-03-26 00:14:36 -07:00
Michael Scire
64a97576d0 ams: support building unit test programs on windows/linux/macos 2022-03-21 17:21:44 -07:00
SciresM
96f95b9f95
Integrate new result macros. (#1780)
* result: try out some experimental shenanigans

* result: sketch out some more shenanigans

* result: see what it looks like to convert kernel to use result conds instead of guards

* make rest of kernel use experimental new macro-ing
2022-02-14 14:45:32 -08:00
Michael Scire
fcc7ce49d9 sm/tipc: ensure technical-correctness of sins (no page cost) 2021-11-06 20:05:32 -07:00
Michael Scire
f98c7cba98 sm: save 0x5000 of memory by sinning 2021-11-06 19:33:08 -07:00
Léo Lam
496adb0018
Minor header fixes to reduce parsing issues with Clang (#1700)
* Work around Clang's incomplete C++20 support for omitting typename

* vapours: fix Clang error about missing return in constexpr function

* stratosphere: fix call to non-constexpr strlen in constexpr function

strlen being constexpr is a non-compliant GCC extension; Clang
explicitly rejects it: https://reviews.llvm.org/D23692

* stratosphere: add a bunch of missing override specifiers

* stratosphere: work around Clang consteval bug

Minimal example: https://godbolt.org/z/MoM64v93M

The issue seems to be that Clang does not consider f(x) to be a
constant expression if x comes from a template argument that isn't
a non-type auto template argument (???)

We can work around this by relaxing GetMessageHeaderForCheck (by using
constexpr instead of consteval). This produces no functional changes
because the result of GetMessageHeaderForCheck() is assigned to a
constexpr variable, so the result is guaranteed to be computed
at compile-time.

* stratosphere: fix missing require clauses in definitions

GCC not requiring the require clauses to be repeated for member
definitions is actually a compiler bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96830

Clang rejects declarations with missing require clauses.

* Fix ALWAYS_INLINE_LAMBDA and parameter list relative order

While GCC doesn't seem to care about the position of the always_inline
attribute relative to the parameter list, Clang is very picky
and requires the attribute to appear after the parameter list
(and before a trailing return type)

* stratosphere: fix static constexpr member variable with incomplete type

GCC accepts this for some reason (because of the lambda?) but Clang
correctly rejects this.
2021-11-06 18:19:34 -07:00
Michael Scire
889d843718 ams: improve offsetof style consistency 2021-10-18 00:17:13 -07:00
Michael Scire
2541f6dd71 tipc: implement special-case templating used by 13.0.0 pgl 2021-10-15 21:23:55 -07:00
Michael Scire
ff5f376c33 tipc: enable named-thread dispatch 2021-10-15 19:59:29 -07:00
Michael Scire
891fa32bf1 tipc/sm: update more fully for 13.0.0 changes 2021-10-13 23:50:57 -07:00
Michael Scire
ca25a884b5 tipc: add additional logic from 13.0.0 2021-10-12 00:57:54 -07:00
Michael Scire
0189c5f1e6 sm/tipc: minor cleanup 2021-10-12 00:20:21 -07:00
Michael Scire
a595c232b9 strat: use m_ for member variables 2021-10-10 00:14:06 -07:00
Michael Scire
d0041a33ac strat: prefer os::NativeHandle to Handle/svc::Handle where sensible 2021-10-04 17:12:32 -07:00
Michael Scire
6f680fe63b strat: use svc:: over ::svc 2021-10-04 14:54:13 -07:00
Michael Scire
77fe5cf6f5 ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
Michael Scire
7444a68cd1 os: adopt multiwait naming over waitable 2021-09-30 19:00:47 -07:00
Michael Scire
41ab4c2c68 stratosphere: use SdkMutex/SdkRecursiveMutex over Mutex 2021-09-29 22:52:50 -07:00
Michael Scire
7e05e12b83 sf/tipc: treat min/max as true min/max, rather than numeric 2021-05-12 22:43:39 -07:00
Michael Scire
0767d9f8da ams: assume gcc 11 2021-04-28 15:13:29 -07:00
Michael Scire
21f3d29df7 strat: compat with gcc 11 2021-04-26 20:06:28 -07:00
Michael Scire
bdcf02a3ef tipc: ports use objects in the object manager 2021-04-14 00:34:46 -07:00
Michael Scire
88ac85c423 sm: save 0x1000 in data costs by not aligning server manager to 0x1000 2021-04-14 00:12:21 -07:00
Michael Scire
b2b0c50802 pgl: update to use tipc (untested) 2021-04-11 03:42:16 -07:00
Michael Scire
b1b3914ccf tipc: Result is first raw data word, not last 2021-04-11 03:42:16 -07:00
Michael Scire
9be8b32311 tipc/sm: various fixes for issues 2021-04-11 03:42:16 -07:00
Michael Scire
57c8bc432d sm: reimplement using tipc instead of cmif (probably broken, untested) 2021-04-11 03:42:16 -07:00
Michael Scire
58776f5ba8 tipc: server processor fixes (compiles!) 2021-04-11 03:42:16 -07:00
Michael Scire
affeeb2724 tipc: implement ServerManager processing logic 2021-04-11 03:42:16 -07:00
Michael Scire
822875ecf5 tipc: implement framework/server support logic (except for actual processing) 2021-04-11 03:42:16 -07:00
Michael Scire
e3a65b1405 tipc: fix deserialization of buffers 2021-04-11 03:42:16 -07:00
Michael Scire
20a7fa1588 tipc: hard-enforce boolean constraints in command processing generation 2021-04-11 03:42:16 -07:00
Michael Scire
315b7bdf22 tipc: implement service object interface generation 2021-04-11 03:42:16 -07:00
Michael Scire
ec988c5a99 tipc: first draft object allocation logic 2021-04-11 03:42:16 -07:00
Michael Scire
21b883a75c tipc: fix compilation issues with core serialization routines 2021-04-11 03:42:16 -07:00
Michael Scire
e93d71d932 tipc: tentative core serialization logic (missing imports, won't compile) 2021-04-11 03:42:16 -07:00