Skip to content

Fix and tests mutex wrapper#42

Merged
chrysn merged 6 commits intomainfrom
mutex-and-tests
Feb 13, 2023
Merged

Fix and tests mutex wrapper#42
chrysn merged 6 commits intomainfrom
mutex-and-tests

Conversation

@chrysn
Copy link
Copy Markdown
Member

@chrysn chrysn commented Feb 12, 2023

This primarily fixes #41, and adds infrastructure to also run (not only build) tests, as well as a test that'd have caught this.

Closes: #41

While this is a breaking change relative to 0.8.1, the new API
introduced in 0.8.1 could not ever have been used meaningfully.
This fixes practical usability now that the Mutex actually works: When
dealing with ValueInThread<&Mutex<T>>, that ValueInThread needs to be as
easy to use as &Mutex<T> (which is always Copy+Clone).
@chrysn chrysn marked this pull request as ready for review February 12, 2023 21:42
@chrysn chrysn enabled auto-merge February 13, 2023 01:42
@chrysn chrysn merged commit 9c29faf into main Feb 13, 2023
@chrysn chrysn deleted the mutex-and-tests branch February 13, 2023 08:13
bors Bot added a commit to RIOT-OS/RIOT that referenced this pull request Feb 20, 2023
19288: rust: Update riot-sys and riot-wrappers r=kaspar030 a=chrysn

### Contribution description

rust: Update riot-sys and riot-wrappers

* riot-wrappers:
  * Fix infinite loop when using a Mutex
  * Make ValueInThread Copy/Clone
* riot-sys:
  * Export xxx_DEV (eg. I2C_DEV) C macros as functions
  * Add auto_init_utils.h

### Testing procedure

CI checks should suffice.

### Issues/PRs references

This pulls in fixes from

* RIOT-OS/rust-riot-sys#18
* RIOT-OS/rust-riot-sys#17 / RIOT-OS/rust-riot-wrappers#37
* RIOT-OS/rust-riot-wrappers#42 / RIOT-OS/rust-riot-wrappers#41


Co-authored-by: chrysn <chrysn@fsfe.org>
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.

mutex.lock() broken in 0.8.1

1 participant