From e348e739e22686c4efd363f556e155e9ee226045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20M=C3=A6hlum?= <magnusmaehlum@outlook.com> Date: Sun, 13 Oct 2024 02:12:50 +0200 Subject: [PATCH] Add random code to environment.c which will affect code size --- src/environment.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/environment.c b/src/environment.c index 4252f1e6..43c87d4b 100644 --- a/src/environment.c +++ b/src/environment.c @@ -5,15 +5,35 @@ #include "reactor-uc/scheduler.h" #include <assert.h> +static struct UsingSomeData { + uint8_t array[100]; + Environment env; +} data[3]; + void Environment_assemble(Environment *self) { validaten(self->main->calculate_levels(self->main)); } void Environment_start(Environment *self) { self->scheduler.run(&self->scheduler); } +void not_useful_function(const char *msg) { + static bool bools[19]; + for (uint32_t i = 0; i < sizeof(bools); i++) { + if (bools[i] == true) { + puts(msg); + bools[i] = false; + } else { + bools[i] = true; + data[0] = (struct UsingSomeData) { + .array = { 0 } + }; + } + } +} + lf_ret_t Environment_wait_until(Environment *self, instant_t wakeup_time) { if (wakeup_time < self->get_physical_time(self)) { return LF_OK; } - + not_useful_function("Testing"); if (self->has_async_events) { return self->platform->wait_until_interruptable(self->platform, wakeup_time); } else { @@ -50,6 +70,8 @@ void Environment_ctor(Environment *self, Reactor *main) { self->get_physical_time = Environment_get_physical_time; self->get_elapsed_physical_time = Environment_get_elapsed_physical_time; + not_useful_function("Hello"); + self->keep_alive = false; self->has_async_events = false; self->startup = NULL;