Closed edwardalee closed 1 week ago
The updates involve modifying a debug print statement in pqueue.c
to improve the memory address printing format and changing the type definition of pqueue_pri_t
from unsigned long long
to uintptr_t
in pqueue_base.h
to standardize memory address handling. These changes help improve code clarity and maintainability without altering any public or exported entity declarations.
Files | Change Summary |
---|---|
core/utils/pqueue.c | Updated the format specifier for memory address printing in a debug print statement. |
include/core/utils/pqueue_base.h | Changed pqueue_pri_t type from unsigned long long to uintptr_t and included <stdint.h> . |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
The Zephyr failure here seems to indicate that earlier inferred deadlines are not resulting in earlier execution on a 32 bit machine, so maybe #448 is actually a better solution?
Closing in favor of #448.
Above I wrote:
I can confirm that using only 32 bits for the priority on 32-bit platforms will not break the reaction queue, which now seems to fit both the tag and deadline into only 32 bits.
After seeing the test failure, I took a second look. For the record, my original assessment was wrong -- based on the implementation of lf_combine_deadline_and_level, it looks like the deadline is in fact represented with 48 bits. Based on the failing test, it looks like this explains the test failure on a 32-bit Zephyr platform.
This PR addresses https://github.com/lf-lang/reactor-c/issues/447 by using an unsigned int data type that can go back and forth from a pointer. To be useful, of course, we will need to point Lingua Franca to this updated reactor-c.