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