Skip to content

Commit

Permalink
Merge branch 'main' into pico-support
Browse files Browse the repository at this point in the history
  • Loading branch information
erlingrj committed Oct 15, 2024
2 parents 3375e54 + 27e332d commit 292ffa7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions include/reactor-uc/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/environment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/platform/posix/posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/platform/zephyr/zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 292ffa7

Please sign in to comment.