2018-09-07 15:00:13 +00:00
|
|
|
/*
|
2021-10-04 19:59:10 +00:00
|
|
|
* Copyright (c) Atmosphère-NX
|
2018-09-07 15:00:13 +00: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 22:02:10 +00:00
|
|
|
#include <stratosphere.hpp>
|
2021-04-10 08:58:26 +00:00
|
|
|
#include "sm_tipc_server.hpp"
|
2019-06-25 00:57:49 +00:00
|
|
|
|
2021-10-08 00:44:54 +00:00
|
|
|
namespace ams {
|
2019-10-24 08:40:44 +00:00
|
|
|
|
2021-10-08 00:44:54 +00:00
|
|
|
namespace init {
|
2019-04-12 22:28:46 +00:00
|
|
|
|
2021-10-08 00:44:54 +00:00
|
|
|
void InitializeSystemModule() { /* ... */ }
|
2021-05-02 17:33:15 +00:00
|
|
|
|
2021-10-08 00:44:54 +00:00
|
|
|
void FinalizeSystemModule() { /* ... */ }
|
2021-05-02 17:33:15 +00:00
|
|
|
|
2021-10-08 00:44:54 +00:00
|
|
|
void Startup() { /* ... */ }
|
2021-05-02 17:33:15 +00:00
|
|
|
|
2021-10-08 00:44:54 +00:00
|
|
|
}
|
2019-10-20 00:42:53 +00:00
|
|
|
|
2021-05-02 17:33:15 +00:00
|
|
|
void NORETURN Exit(int rc) {
|
2021-10-07 06:22:54 +00:00
|
|
|
AMS_UNUSED(rc);
|
2021-05-02 17:33:15 +00:00
|
|
|
AMS_ABORT("Exit called by immortal process");
|
|
|
|
}
|
|
|
|
|
2021-10-08 00:44:54 +00: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 00:44:54 +00:00
|
|
|
/* Initialize the server. */
|
|
|
|
sm::InitializeTipcServer();
|
2021-01-22 11:52:10 +00:00
|
|
|
|
2021-10-08 00:44:54 +00:00
|
|
|
/* Loop forever, processing our services. */
|
|
|
|
sm::LoopProcessTipcServer();
|
2020-04-17 08:06:07 +00:00
|
|
|
|
2021-10-08 00:44:54 +00:00
|
|
|
/* This can never be reached. */
|
|
|
|
AMS_ASSUME(false);
|
|
|
|
}
|
2019-06-17 16:17:53 +00:00
|
|
|
|
2018-04-22 03:17:57 +00:00
|
|
|
}
|