[posix-app] remove pseudo reset (#3190)
diff --git a/src/posix/main.c b/src/posix/main.c
index 8b58923..818787e 100644
--- a/src/posix/main.c
+++ b/src/posix/main.c
@@ -86,7 +86,7 @@
otDiagInit(sInstance);
#endif
- while (!otSysPseudoResetWasRequested())
+ while (true)
{
otTaskletsProcess(sInstance);
otSysProcessDrivers(sInstance);
diff --git a/src/posix/platform/misc.c b/src/posix/platform/misc.c
index 86e36a1..61f5f0c 100644
--- a/src/posix/platform/misc.c
+++ b/src/posix/platform/misc.c
@@ -38,26 +38,17 @@
extern jmp_buf gResetJump;
-static otPlatResetReason sPlatResetReason = OT_PLAT_RESET_REASON_POWER_ON;
-bool gPlatformPseudoResetWasRequested;
+static otPlatResetReason sPlatResetReason = OT_PLAT_RESET_REASON_POWER_ON;
static otPlatMcuPowerState gPlatMcuPowerState = OT_PLAT_MCU_POWER_STATE_ON;
void otPlatReset(otInstance *aInstance)
{
-#if OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
- gPlatformPseudoResetWasRequested = true;
- sPlatResetReason = OT_PLAT_RESET_REASON_SOFTWARE;
-
-#else // elif OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
-
otSysDeinit();
platformUartRestore();
longjmp(gResetJump, 1);
assert(false);
-#endif // else OPENTHREAD_PLATFORM_USE_PSEUDO_RESET
-
(void)aInstance;
}
diff --git a/src/posix/platform/openthread-system.h b/src/posix/platform/openthread-system.h
index de8b2d1..2ad2e88 100644
--- a/src/posix/platform/openthread-system.h
+++ b/src/posix/platform/openthread-system.h
@@ -63,17 +63,6 @@
void otSysDeinit(void);
/**
- * This function returns true if a pseudo-reset was requested.
- *
- * In such a case, the main loop should shut down and re-initialize the OpenThread instance.
- *
- * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function
- * in the main loop to determine when to shut down and re-initialize the OpenThread instance.
- *
- */
-bool otSysPseudoResetWasRequested(void);
-
-/**
* This function performs all platform-specific processing for OpenThread's example applications.
*
* @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function
diff --git a/src/posix/platform/system.c b/src/posix/platform/system.c
index fe80ac5..f572d70 100644
--- a/src/posix/platform/system.c
+++ b/src/posix/platform/system.c
@@ -49,8 +49,6 @@
uint64_t gNodeId = 0;
-extern bool gPlatformPseudoResetWasRequested;
-
static void PrintUsage(const char *aProgramName, FILE *aStream, int aExitCode)
{
fprintf(aStream,
@@ -71,12 +69,6 @@
const char *radioFile = NULL;
const char *radioConfig = "";
- if (gPlatformPseudoResetWasRequested)
- {
- gPlatformPseudoResetWasRequested = false;
- return;
- }
-
while (true)
{
int option;
@@ -150,11 +142,6 @@
}
}
-bool otSysPseudoResetWasRequested(void)
-{
- return gPlatformPseudoResetWasRequested;
-}
-
void otSysDeinit(void)
{
#if OPENTHREAD_POSIX_VIRTUAL_TIME