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

core/lock: silence glibc warnings against pthread robust mutex functions #2548

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

xrmx
Copy link
Collaborator

@xrmx xrmx commented Jul 25, 2023

Since glibc 2.34 we are gettings warnings that pthread_mutexattr_setrobust_np and pthread_mutex_consistent_np are deprecated.
Problem is that we are checking PTHREAD_MUTEX_ROBUST with the preprocessor but it doesn't work because it's an enum :) So in the end we are using the _np versions of the functions even if the standard ones are available. Since this stuff is implemented on linux libc since 2010-2011 and 2016 in freebsd assume it's here.

Since glibc 2.34 we are gettings warnings that pthread_mutexattr_setrobust_np
and pthread_mutex_consistent_np are deprecated.
Problem is that we are checking PTHREAD_MUTEX_ROBUST with the
preprocessor but it doesn't work because it's an enum :) So in the end
we are using the _np versions of the functions even if the standard ones
are available. Since this stuff is implemented on linux libc since
2010-2011 and 2016 in freebsd assume it's here.
@xrmx
Copy link
Collaborator Author

xrmx commented Jul 25, 2023

@rdeioris Any chance you can give it a run on macos?

@xrmx
Copy link
Collaborator Author

xrmx commented Jul 28, 2023

Macos does not use mutexes and illumos has them so I think this is good.

@xrmx xrmx merged commit b3e09ce into unbit:master Jul 28, 2023
23 checks passed
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.

1 participant