mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 14:05:17 -04:00
strat: no longer materially constrained by sm session limit
This commit is contained in:
parent
997e4dd665
commit
2e1a93f1d1
37 changed files with 215 additions and 333 deletions
|
@ -20,6 +20,10 @@
|
|||
|
||||
namespace ams::sm {
|
||||
|
||||
/* Initialization. */
|
||||
Result Initialize();
|
||||
Result Finalize();
|
||||
|
||||
/* Ordinary SM API. */
|
||||
Result GetService(Service *out, ServiceName name);
|
||||
Result RegisterService(Handle *out, ServiceName name, size_t max_sessions, bool is_light);
|
||||
|
@ -29,17 +33,4 @@ namespace ams::sm {
|
|||
Result HasService(bool *out, ServiceName name);
|
||||
Result WaitService(ServiceName name);
|
||||
|
||||
/* Scoped session access. */
|
||||
namespace impl {
|
||||
|
||||
void DoWithSessionImpl(void (*Invoker)(void *), void *Function);
|
||||
|
||||
}
|
||||
|
||||
template<typename F>
|
||||
NX_CONSTEXPR void DoWithSession(F f) {
|
||||
auto invoker = +[](void *func) { (*(F *)func)(); };
|
||||
impl::DoWithSessionImpl(invoker, &f);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue