From 840c8aeba268c3418dd88f0fd3479a2ed30d3520 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Thu, 6 Dec 2018 11:47:17 +0100 Subject: [PATCH] cord/epsim: remove standalone submodule --- Makefile.dep | 5 -- makefiles/pseudomodules.inc.mk | 1 - sys/auto_init/auto_init.c | 5 -- sys/net/application_layer/cord/epsim/Makefile | 4 -- .../cord/epsim/cord_epsim_standalone.c | 59 ------------------- 5 files changed, 74 deletions(-) delete mode 100644 sys/net/application_layer/cord/epsim/cord_epsim_standalone.c diff --git a/Makefile.dep b/Makefile.dep index 36e09558e2..3de6f2bf76 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -792,11 +792,6 @@ ifneq (,$(filter bluetil_addr,$(USEMODULE))) USEMODULE += fmt endif -ifneq (,$(filter cord_epsim_standalone,$(USEMODULE))) - USEMODULE += cord_epsim - USEMODULE += xtimer -endif - ifneq (,$(filter cord_epsim,$(USEMODULE))) USEMODULE += cord_common USEMODULE += gcoap diff --git a/makefiles/pseudomodules.inc.mk b/makefiles/pseudomodules.inc.mk index 165d9e1be0..6b2b3b290e 100644 --- a/makefiles/pseudomodules.inc.mk +++ b/makefiles/pseudomodules.inc.mk @@ -6,7 +6,6 @@ PSEUDOMODULES += can_raw PSEUDOMODULES += ccn-lite-utils PSEUDOMODULES += conn_can_isotp_multi PSEUDOMODULES += cord_ep_standalone -PSEUDOMODULES += cord_epsim_standalone PSEUDOMODULES += core_% PSEUDOMODULES += cortexm_fpu PSEUDOMODULES += ecc_% diff --git a/sys/auto_init/auto_init.c b/sys/auto_init/auto_init.c index 73cff40e39..2f8c9f6be8 100644 --- a/sys/auto_init/auto_init.c +++ b/sys/auto_init/auto_init.c @@ -168,11 +168,6 @@ void auto_init(void) extern void cord_ep_standalone_run(void); cord_ep_standalone_run(); #endif -#ifdef MODULE_CORD_EPSIM_STANDALONE - DEBUG("Auto init cord_epsim module\n"); - extern void cord_epsim_run(void); - cord_epsim_run(); -#endif #ifdef MODULE_ASYMCUTE DEBUG("Auto init Asymcute\n"); asymcute_handler_run(); diff --git a/sys/net/application_layer/cord/epsim/Makefile b/sys/net/application_layer/cord/epsim/Makefile index 75aa88acb9..1dcc423379 100644 --- a/sys/net/application_layer/cord/epsim/Makefile +++ b/sys/net/application_layer/cord/epsim/Makefile @@ -2,8 +2,4 @@ MODULE = cord_epsim SRC = cord_epsim.c -ifneq (,$(filter cord_epsim_standalone,$(USEMODULE))) - SRC += cord_epsim_standalone.c -endif - include $(RIOTBASE)/Makefile.base diff --git a/sys/net/application_layer/cord/epsim/cord_epsim_standalone.c b/sys/net/application_layer/cord/epsim/cord_epsim_standalone.c deleted file mode 100644 index c4472e230a..0000000000 --- a/sys/net/application_layer/cord/epsim/cord_epsim_standalone.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2017 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup net_cord_epsim - * @{ - * - * @file - * @brief Standalone extension for the simple RD registration endpoint - * - * @author Hauke Petersen - * - * @} - */ - -#include "log.h" -#include "thread.h" -#include "xtimer.h" -#include "net/cord/epsim.h" -#include "net/cord/config.h" - -#define STACKSIZE (THREAD_STACKSIZE_DEFAULT) -#define PRIO (THREAD_PRIORITY_MAIN - 1) -#define TNAME "cord_epsim" - -static char _stack[STACKSIZE]; - -static void *reg_runner(void *arg) -{ - (void)arg; - - /* wait some seconds to give the address configuration some time to settle */ - xtimer_sleep(CORD_STARTUP_DELAY); - - while (1) { - if (cord_epsim_register() != CORD_EPSIM_OK) { - /* if this fails once, it will always fail, so we might as well - * quit now */ - LOG_ERROR("[cord_epsim] error: unable to send registration\n"); - break; - } - xtimer_sleep(CORD_UPDATE_INTERVAL); - } - - return NULL; -} - -#ifdef MODULE_CORD_EPSIM_STANDALONE -void cord_epsim_run(void) -{ - thread_create(_stack, sizeof(_stack), PRIO, THREAD_CREATE_STACKTEST, - reg_runner, NULL, TNAME); -} -#endif