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

Replace the non-standard PTHREAD_MUTEX_ERRORCHECK_NP and fix a leak #413

Merged
merged 1 commit into from
Oct 14, 2020

Conversation

gadmm
Copy link
Contributor

@gadmm gadmm commented Oct 13, 2020

Adapting code from ocaml trunk, this does two things:

  1. destroy the mutexattr
  2. replace the older and non-standard PTHREAD_MUTEX_ERRORCHECK_NP with the standard PTHREAD_MUTEX_ERRORCHECK. This is reported as necessary for compiling multicore with musl (fixes 'PTHREAD_MUTEX_ERRORCHECK_NP' undeclared #266). According to @stedolan “This function was part of SUSv2 in 1997, and was included in POSIX.1-2001 as part of the XSI extension. The recent change is that it was made mandatory rather than part of an extension, but I'm not aware of any pthread implementations that lack it.”

@kayceesrk kayceesrk merged commit 8a72e14 into ocaml-multicore:parallel_minor_gc Oct 14, 2020
@kayceesrk
Copy link
Contributor

Thanks @gadmm. Looks good to me.

@gadmm gadmm deleted the errorcheck_np branch October 14, 2020 10:38
sadiqj pushed a commit to sadiqj/ocaml that referenced this pull request Jan 10, 2022
…orcheck_np

Replace the non-standard PTHREAD_MUTEX_ERRORCHECK_NP and fix a leak
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.

'PTHREAD_MUTEX_ERRORCHECK_NP' undeclared
2 participants