2018-09-07 16:00:13 +01:00
|
|
|
/*
|
2021-10-04 20:59:10 +01:00
|
|
|
* Copyright (c) Atmosphère-NX
|
2018-09-07 16:00:13 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2020-05-11 23:02:10 +01:00
|
|
|
#include <stratosphere.hpp>
|
2021-04-10 09:58:26 +01:00
|
|
|
#include "sm_tipc_server.hpp"
|
2019-06-25 01:57:49 +01:00
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
namespace ams {
|
2019-10-24 09:40:44 +01:00
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
namespace init {
|
2019-04-12 23:28:46 +01:00
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
void InitializeSystemModule() { /* ... */ }
|
2021-05-02 18:33:15 +01:00
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
void FinalizeSystemModule() { /* ... */ }
|
2021-05-02 18:33:15 +01:00
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
void Startup() { /* ... */ }
|
2021-05-02 18:33:15 +01:00
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
}
|
2019-10-20 01:42:53 +01:00
|
|
|
|
2021-05-02 18:33:15 +01:00
|
|
|
void NORETURN Exit(int rc) {
|
2021-10-07 07:22:54 +01:00
|
|
|
AMS_UNUSED(rc);
|
2021-05-02 18:33:15 +01:00
|
|
|
AMS_ABORT("Exit called by immortal process");
|
|
|
|
}
|
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
void Main() {
|
|
|
|
/* Set thread name. */
|
|
|
|
os::SetThreadNamePointer(os::GetCurrentThread(), AMS_GET_SYSTEM_THREAD_NAME(sm, Main));
|
|
|
|
AMS_ASSERT(os::GetThreadPriority(os::GetCurrentThread()) == AMS_GET_SYSTEM_THREAD_PRIORITY(sm, Main));
|
2021-01-17 23:03:51 +00:00
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
/* Initialize the server. */
|
|
|
|
sm::InitializeTipcServer();
|
2021-01-22 11:52:10 +00:00
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
/* Loop forever, processing our services. */
|
|
|
|
sm::LoopProcessTipcServer();
|
2020-04-17 09:06:07 +01:00
|
|
|
|
2021-10-08 01:44:54 +01:00
|
|
|
/* This can never be reached. */
|
|
|
|
AMS_ASSUME(false);
|
|
|
|
}
|
2019-06-17 17:17:53 +01:00
|
|
|
|
2018-04-22 04:17:57 +01:00
|
|
|
}
|