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

FreeBSD recursive mutex initializer #1090

Open
rubiefawn opened this issue Nov 21, 2024 · 1 comment
Open

FreeBSD recursive mutex initializer #1090

rubiefawn opened this issue Nov 21, 2024 · 1 comment

Comments

@rubiefawn
Copy link

FreeBSD does not have an equivalent to the PTHREAD_RECURSIVE_MUTEX_INITIALIZER macro. It's my (extremely limited and possibly incorrect) understanding that this macro is used for statically allocated mutexes that could be accessed before pthread_mutex_init() would have a chance to be called on them. sentry_sync.h handles this for musl libc and AIX by defining SENTRY__MUTEX_INIT as a literal value, but this approach can't work for FreeBSD because FreeBSD libc defines pthread_mutex_t as struct pthread_mutex*. Since it's a pointer, I don't see how a literal value can be useful here. What is a sane way to proceed?

sentry-native is a dependency of another project I am looking to add FreeBSD support to, so I'm not very familiar with Sentry itself. Thank you for your patience.

@JoshuaMoelans
Copy link
Member

Hi, thanks for raising this. We're looking into it, and will keep you updated.

@JoshuaMoelans JoshuaMoelans moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Needs Investigation
Development

No branches or pull requests

3 participants