Skip to content

Align WorkQueueBuilder with new workqueue work timeout feature #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bjarki-andreasen
Copy link

The feature comes with a new parameter to be initialized using the WorkQueueBuilder.

d3zd3z added 2 commits March 31, 2025 16:15
Ensure that all tests and samples start with 'sample.rust' or
'test.rust' to avoid conflict with names in the main Zephyr tree.

Signed-off-by: David Brown <[email protected]>
Remove the integration platform, which was with a platform not listed in
the supported platforms.

Signed-off-by: David Brown <[email protected]>
The k_work_q has been extended with a new feature, the work timeout,
which comes with a new field to k_work_queue_config, work_timeout_ms,
which must be initialized.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
@d3zd3z
Copy link
Collaborator

d3zd3z commented Apr 11, 2025

Thank you for your contribution. I am actually in the midst of a bit of an overhaul of how the workqueue code works, so we'll have to rework this a bit at that point.

Probably my main concern is that with the current code, the work will actually get leaked if it is aborted due to a timeout. I'll try to think if there is a way to deal with this.

One thing I have planned to add is to allow my new struct Work to be passed as &'static Work, which would make the lifetime issues less of a concern.

@d3zd3z
Copy link
Collaborator

d3zd3z commented Apr 30, 2025

I think the only practical way to get this into both Zephyr and Rust is going to be to add the support based on some conditional (CONFIG_HAVE_...) so that the rust code will compile either way. It is too constraining to be practical to try and push these together lock step.

@bjarki-andreasen
Copy link
Author

bjarki-andreasen commented May 1, 2025

I think the only practical way to get this into both Zephyr and Rust is going to be to add the support based on some conditional (CONFIG_HAVE_...) so that the rust code will compile either way. It is too constraining to be practical to try and push these together lock step.

Modules in zephyr constantly need to be updated and synced, this is not an issue :) The process is this:

  1. create PR which changes zephyr module (Rust)
  2. create PR for zephyr which does two things:
    • update zephyr manifest to point to Rust PR
    • adjust zephyr to match changes in zephyr module (Rust)
  3. Wait for green CI in zephyr, which means zephyr and the changes to the module work together.
  4. Merge PR for zephyr module (Rust)
  5. update zephyr PR to point to the new Rust sha
  6. Wait for green CI in zephyr
  7. Merge zephyr PR

The problem here is that the module itself is running its own CI, against an incorrect version of zephyr, IE, not the one being created in step 2.

The CI in this PR here should be ignored, as it is not tracking zephyr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants