Skip to content

Commit 802e40e

Browse files
authored
Fix the name of set_current_id_after_a_fork in the libc backend. (#101)
This makes it match the linux_raw backend.
1 parent 7fe0036 commit 802e40e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ assert_cmd = "2.0.12"
5353
[features]
5454
default = ["std", "log", "libc", "errno", "thread", "init-fini-arrays"]
5555
std = ["rustix/std", "bitflags/std"]
56-
set_thread_id = []
5756
rustc-dep-of-std = [
5857
"dep:core",
5958
"dep:alloc",
@@ -66,6 +65,9 @@ rustc-dep-of-std = [
6665
"dep:compiler_builtins",
6766
]
6867

68+
# Enable the `set_current_id_after_a_fork` function.
69+
set_thread_id = []
70+
6971
# Use origin's implementation of program startup and shutdown.
7072
origin-program = []
7173

src/thread/libc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ pub fn current_id() -> ThreadId {
184184
#[cfg(feature = "set_thread_id")]
185185
#[doc(hidden)]
186186
#[inline]
187-
pub unsafe fn set_current_thread_id_after_a_fork(tid: ThreadId) {
187+
pub unsafe fn set_current_id_after_a_fork(tid: ThreadId) {
188188
// Nothing to do here; libc does the update automatically.
189189
let _ = tid;
190190
}

0 commit comments

Comments
 (0)