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

fix compilation on emscripten #1917

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pgrx-pg-sys/src/submodules/thread_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn init_active_thread(tid: NonZeroUsize) {
panic!("Attempt to initialize `pgrx` active thread from a thread other than the main");
}
match ACTIVE_THREAD.compare_exchange(0, tid.get(), Ordering::Relaxed, Ordering::Relaxed) {
#[cfg(not(target_os = "windows"))]
#[cfg(all(target_family = "unix", not(target_os = "emscripten")))]
Ok(_) => unsafe {
// We won the race. Register an atfork handler to clear the atomic
// in any child processes we spawn.
Expand All @@ -103,7 +103,7 @@ fn init_active_thread(tid: NonZeroUsize) {
}
libc::pthread_atfork(None, None, Some(clear_in_child));
},
#[cfg(target_os = "windows")]
#[allow(unreachable_patterns)]
Ok(_) => (),
Err(_) => {
thread_id_check_failed();
Expand Down
Loading