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

Use pthread_rwlock for RW locks in userland #639

Merged
merged 4 commits into from
Oct 7, 2021
Merged

Use pthread_rwlock for RW locks in userland #639

merged 4 commits into from
Oct 7, 2021

Conversation

paullouisageneau
Copy link
Contributor

@paullouisageneau paullouisageneau commented Oct 7, 2021

This PR introduces pthread_rwlock instead of pthread_mutex to implement RW locks, as suggested in #538.

@paullouisageneau paullouisageneau mentioned this pull request Oct 7, 2021
@tuexen
Copy link
Member

tuexen commented Oct 7, 2021

You changed the

  • inp info lock
  • inp lock
  • ipi addr lock

In FreeBSD we have some test coverage with inp info lock and the ipi addr lock being r/w locks. But we haven't used r/w locks for inp lock and I don't think you would gain much. So I would prefer not to change the inp lock yet. Could you revert that part?

A different question: Do you know how to change the inp info lock and the ipi addr lock on Windows? It would be great to have the same locking on all platforms supported by usrsctp...

@paullouisageneau
Copy link
Contributor Author

paullouisageneau commented Oct 7, 2021

In FreeBSD we have some test coverage with inp info lock and the ipi addr lock being r/w locks. But we haven't used r/w locks for inp lock and I don't think you would gain much. So I would prefer not to change the inp lock yet. Could you revert that part?

A different question: Do you know how to change the inp info lock and the ipi addr lock on Windows? It would be great to have the same locking on all platforms supported by usrsctp...

Sure, I reverted the inp lock and changed the locks also for Windows. There was no shared locks before Vista (yeah...) so I excluded WIndows XP from the change.

@tuexen tuexen merged commit 9d6b99b into sctplab:master Oct 7, 2021
@tuexen
Copy link
Member

tuexen commented Oct 7, 2021

Thanks for providing the patch!

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.

None yet

2 participants