Skip to content
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

Default methods #3749

Closed
wants to merge 1 commit into from
Closed

Default methods #3749

wants to merge 1 commit into from

Conversation

pcwalton
Copy link
Contributor

@nikomatsakis
Copy link
Contributor

Overall this looks good to me. There are a few places where some more comments would be nice, as I requested above. Clearly more tests would be nice but we'll add them over time. r+

@pcwalton pcwalton closed this Oct 16, 2012
bors pushed a commit to rust-lang-ci/rust that referenced this pull request May 15, 2021
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Sep 8, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Sep 8, 2024
…alfJung

Detect when pthread_mutex_t is moved

What I am not sure about this PR is how to support storing the additional mutex data like its address and kind. If I understand correctly the `concurrency::sync::Mutex` struct is to be used by any mutex implementation. This possibly means that different implementation might want to store different data in the mutex. So any additional data should be implementation defined somehow. Solutions that come to mind:

- Store the additional data as `Box<dyn Any>` and the implementations can downcast their data when they fetch them.
- Have each shim implementation define a `static mut` map between `MutexID`s and the additional data.

Let me know

Fixes rust-lang#3749
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Sep 17, 2024
…fJung

detect when pthread_rwlock_t is moved

For some implementations of pthreads, the address of pthread_rwlock_t (or its fields) is used to identify the lock. That means that if the contents of a pthread_rwlock_t are moved in memory, effectively a new lock object is created, which is completely independted from the original. Thus we want to detect when when such objects are moved and show an error.

see also rust-lang#3749 for more context
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Sep 17, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Sep 17, 2024
shrirambalaji pushed a commit to shrirambalaji/rust that referenced this pull request Oct 6, 2024
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.

3 participants