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