From 20f61fb9fea80ef2b0ff93c83463b7e7256049ad Mon Sep 17 00:00:00 2001 From: erling Date: Mon, 14 Oct 2024 19:41:52 -0700 Subject: [PATCH 1/2] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 42fd0512..72670c22 100644 --- a/README.md +++ b/README.md @@ -75,10 +75,10 @@ which enable distributed embedded systems. ## References `reactor-uc` draws inspiration from the following existing open-source projects: -- reactor-cpp -- reactor-c -- qpc -- ssm-runtime +- [reactor-cpp](https://github.com/lf-lang/reactor-cpp) +- [reactor-c](https://github.com/lf-lang/reactor-c) +- [qpc](https://github.com/QuantumLeaps/qpc) +- [ssm-runtime](https://github.com/QuantumLeaps/qpc) ## TODO for the MVP: - [x] Timers From 27e332d8817c68e32bfd07ffdfce25a9065c6bff Mon Sep 17 00:00:00 2001 From: Lasse Rosenow <10547444+LasseRosenow@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:44:11 +0200 Subject: [PATCH 2/2] Fix spelling of wait_until_interruptible (#62) --- include/reactor-uc/platform.h | 4 ++-- src/environment.c | 2 +- src/platform/posix/posix.c | 4 ++-- src/platform/zephyr/zephyr.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/reactor-uc/platform.h b/include/reactor-uc/platform.h index c7863d5b..da2a80c2 100644 --- a/include/reactor-uc/platform.h +++ b/include/reactor-uc/platform.h @@ -24,11 +24,11 @@ struct Platform { * @brief Put the system to sleep until the wakeup time or until an * asynchronous event occurs. */ - lf_ret_t (*wait_until_interruptable)(Platform *self, instant_t wakeup_time); + lf_ret_t (*wait_until_interruptible)(Platform *self, instant_t wakeup_time); /** * @brief Signal the occurrence of an asynchronous event. This should wake - * up the platform if it is sleeping on `wait_until_interruptable`. + * up the platform if it is sleeping on `wait_until_interruptible`. */ void (*new_async_event)(Platform *self); diff --git a/src/environment.c b/src/environment.c index 4252f1e6..bf9ebc5b 100644 --- a/src/environment.c +++ b/src/environment.c @@ -15,7 +15,7 @@ lf_ret_t Environment_wait_until(Environment *self, instant_t wakeup_time) { } if (self->has_async_events) { - return self->platform->wait_until_interruptable(self->platform, wakeup_time); + return self->platform->wait_until_interruptible(self->platform, wakeup_time); } else { return self->platform->wait_until(self->platform, wakeup_time); } diff --git a/src/platform/posix/posix.c b/src/platform/posix/posix.c index a9a4b39b..2d66ebf2 100644 --- a/src/platform/posix/posix.c +++ b/src/platform/posix/posix.c @@ -40,7 +40,7 @@ instant_t PlatformPosix_get_physical_time(Platform *self) { return convert_timespec_to_ns(tspec); } -lf_ret_t PlatformPosix_wait_until_interruptable(Platform *_self, instant_t wakeup_time) { +lf_ret_t PlatformPosix_wait_until_interruptible(Platform *_self, instant_t wakeup_time) { LF_DEBUG(PLATFORM, "Interruptable wait until %" PRId64, wakeup_time); PlatformPosix *self = (PlatformPosix *)_self; const struct timespec tspec = convert_ns_to_timespec(wakeup_time); @@ -96,7 +96,7 @@ void Platform_ctor(Platform *self) { self->get_physical_time = PlatformPosix_get_physical_time; self->wait_until = PlatformPosix_wait_until; self->initialize = PlatformPosix_initialize; - self->wait_until_interruptable = PlatformPosix_wait_until_interruptable; + self->wait_until_interruptible = PlatformPosix_wait_until_interruptible; self->new_async_event = PlatformPosix_new_async_event; } diff --git a/src/platform/zephyr/zephyr.c b/src/platform/zephyr/zephyr.c index a4045e7e..2bb2b593 100644 --- a/src/platform/zephyr/zephyr.c +++ b/src/platform/zephyr/zephyr.c @@ -40,7 +40,7 @@ lf_ret_t PlatformZephyr_wait_until(Platform *self, instant_t wakeup_time) { } } -lf_ret_t PlatformZephyr_wait_until_interruptable(Platform *self, instant_t wakeup_time) { +lf_ret_t PlatformZephyr_wait_until_interruptible(Platform *self, instant_t wakeup_time) { PlatformZephyr *p = (PlatformZephyr *)self; LF_DEBUG(PLATFORM, "Wait until interruptable %" PRId64, wakeup_time); interval_t sleep_duration = wakeup_time - self->get_physical_time(self); @@ -89,7 +89,7 @@ void Platform_ctor(Platform *self) { self->get_physical_time = PlatformZephyr_get_physical_time; self->wait_until = PlatformZephyr_wait_until; self->initialize = PlatformZephyr_initialize; - self->wait_until_interruptable = PlatformZephyr_wait_until_interruptable; + self->wait_until_interruptible = PlatformZephyr_wait_until_interruptible; self->new_async_event = PlatformZephyr_new_async_event; }