Skip to content

Avoid usage of thread_local on DragonFlyBSD #3653

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

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Apr 6, 2024

Both __errno_location() and __error() return the same value, so the __error() function can be implemented on the Rust side as __errno_location(). This eliminates the sole use of thread_local in this crate.

@rustbot
Copy link
Collaborator

rustbot commented Apr 6, 2024

r? @JohnTitor

rustbot has assigned @JohnTitor.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@bjorn3 bjorn3 force-pushed the dragonfly_no_thread_local branch from 64bd72c to 1ab93fb Compare April 16, 2024 12:26
__error() has been deprecated and return the same value as
__errno_location(). Removing the __error() function eliminates the sole
use of thread_local in this crate.
@bjorn3 bjorn3 force-pushed the dragonfly_no_thread_local branch from 1ab93fb to de76fee Compare April 16, 2024 12:27
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Thanks!

@JohnTitor JohnTitor added this pull request to the merge queue Apr 17, 2024
Merged via the queue into rust-lang:main with commit 5b96ddf Apr 17, 2024
41 checks passed
@bjorn3 bjorn3 deleted the dragonfly_no_thread_local branch April 17, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants