Skip to content

Commit c659e29

Browse files
sami-danieltgross35
authored andcommitted
feat(linux): add tgkill for Linux and Android
Add the `tgkill(tgid, tid, sig)` wrapper
1 parent c6900b7 commit c659e29

4 files changed

Lines changed: 6 additions & 0 deletions

File tree

libc-test/semver/android.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4061,6 +4061,7 @@ tee
40614061
telldir
40624062
termios
40634063
termios2
4064+
tgkill
40644065
time
40654066
time_t
40664067
timegm

libc-test/semver/linux-gnu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ sgetspent_r
675675
statx
676676
statx_timestamp
677677
tcp_info
678+
tgkill
678679
timex
679680
utmpname
680681
utmpx

src/unix/linux_like/android/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3640,6 +3640,8 @@ extern "C" {
36403640

36413641
pub fn gettid() -> crate::pid_t;
36423642

3643+
pub fn tgkill(tgid: crate::pid_t, tid: crate::pid_t, sig: c_int) -> c_int;
3644+
36433645
pub fn getauxval(type_: c_ulong) -> c_ulong;
36443646

36453647
/// Only available in API Version 28+

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,8 @@ extern "C" {
12281228
) -> c_int;
12291229

12301230
pub fn mempcpy(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
1231+
1232+
pub fn tgkill(tgid: crate::pid_t, tid: crate::pid_t, sig: c_int) -> c_int;
12311233
}
12321234

12331235
cfg_if! {

0 commit comments

Comments
 (0)