Multiple improvements to RwLocks by a1phyr · Pull Request #84687 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation12 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

a1phyr

This PR replicates #77147, #77380 and #84650 on RWLocks :

Notes to reviewers :

r? @m-ou-se

@CDirkx

A comment says that StaticMutex is not re-entrant, I don't understand why and I don't know whether it applies to StaticRWLock.

StaticMutex deadlocks on re-entrancy, but also causes undefined behaviour when locked twice on unix:

// A pthread mutex initialized with PTHREAD_MUTEX_INITIALIZER will have
// a type of PTHREAD_MUTEX_DEFAULT, which has undefined behavior if you
// try to re-lock it from the same thread when you already hold a lock

StaticRWLock deadlocks on re-entrancy, but doesn't cause undefined behaviour.

CDirkx

@bors

@a1phyr

@bors

@a1phyr

@m-ou-se m-ou-se added the T-libs

Relevant to the library team, which will review and decide on the PR/issue.

label

Jun 1, 2021

@m-ou-se

Very nice! Thanks!

(Sorry for the late review.)

@bors r+

@bors

📌 Commit ac470e9 has been approved by m-ou-se

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Jun 6, 2021

@bors

⌛ Testing commit ac470e9 with merge 7ec1035eca280ff57be0c76930820203a694f316...

@bors

@bors bors added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Jun 8, 2021

@rust-log-analyzer

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@JohnTitor

2021-06-08T15:52:15.0727607Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'ubuntu-latest'
2021-06-08T15:52:15.1076278Z Can't find any online and idle self-hosted runner in current repository's organization account that matches the required labels: 'ubuntu-latest'
2021-06-08T15:52:15.2176794Z Found online and idle hosted runner in current repository's organization account that matches the required labels: 'ubuntu-latest'

@bors retry

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Jun 9, 2021

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jun 10, 2021

@bors

Rollup of 7 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

@a1phyr a1phyr deleted the improve_rwlock branch

August 23, 2022 23:22

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.