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

Support pthread_rwlock #5952

Merged
merged 12 commits into from
Feb 10, 2023
Merged

Support pthread_rwlock #5952

merged 12 commits into from
Feb 10, 2023

Conversation

tmael
Copy link
Contributor

@tmael tmael commented Jan 4, 2023

Description

This PR adds read-write lock (pthread_rwlock_t) support in Linux with a build setting WOLFSSL_USE_RWLOCK option.

Fixes zd#15424

Testing

./configure CFLAGS="-DWOLFSSL_USE_RWLOCK" && make check

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@tmael tmael changed the title Support rwlock Support pthread_rwlock Jan 4, 2023
@tmael tmael self-assigned this Jan 5, 2023
@julek-wolfssl julek-wolfssl self-assigned this Jan 16, 2023
@julek-wolfssl
Copy link
Member

Rebased and fixed segmentation fault. The segfault was occurring due to the pthread_cond_wait call being macro'ed out in StartMonitorCRL. Now separation between locks and mutexs is explicit so that migrate portions/new code to rwlocks where appropriate.

Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refactor looks great! Just a couple clarifying questions.

src/tls13.c Show resolved Hide resolved
src/ssl.c Show resolved Hide resolved
src/ssl.c Show resolved Hide resolved
wolfcrypt/src/wc_port.c Show resolved Hide resolved
wolfcrypt/src/wc_port.c Show resolved Hide resolved
src/ssl.c Outdated Show resolved Hide resolved
@dgarske dgarske assigned tmael and unassigned dgarske Feb 9, 2023
@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@julek-wolfssl julek-wolfssl assigned julek-wolfssl and unassigned tmael Feb 10, 2023
@dgarske dgarske merged commit 55a7e24 into wolfSSL:master Feb 10, 2023
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.

4 participants