Skip to content

Commit 3114845

Browse files
committed
Auto merge of #2433 - devnexen:fbsd_htr_self, r=JohnTitor
freebsd native api addition to deal with thread
2 parents 90ee61b + 00d3a8a commit 3114845

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,6 +1830,7 @@ fn test_freebsd(target: &str) {
18301830
"sys/stat.h",
18311831
"sys/statvfs.h",
18321832
"sys/sysctl.h",
1833+
"sys/thr.h",
18331834
"sys/time.h",
18341835
"sys/times.h",
18351836
"sys/timex.h",

libc-test/semver/freebsd.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,6 +1752,9 @@ sysctl
17521752
sysctlbyname
17531753
sysctlnametomib
17541754
telldir
1755+
thr_kill
1756+
thr_kill2
1757+
thr_self
17551758
timer_create
17561759
timer_delete
17571760
timer_getoverrun

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,6 +1791,9 @@ extern "C" {
17911791

17921792
pub fn uuidgen(store: *mut uuid, count: ::c_int) -> ::c_int;
17931793

1794+
pub fn thr_kill(id: ::c_long, sig: ::c_int) -> ::c_int;
1795+
pub fn thr_kill2(pid: ::pid_t, id: ::c_long, sig: ::c_int) -> ::c_int;
1796+
pub fn thr_self(tid: *mut ::c_long) -> ::c_int;
17941797
pub fn pthread_getthreadid_np() -> ::c_int;
17951798
pub fn pthread_getaffinity_np(
17961799
td: ::pthread_t,

0 commit comments

Comments
 (0)