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