Skip to content

Commit 08c0f2c

Browse files
committed
Auto merge of #2873 - pirocks:master, r=JohnTitor
Add pthread_sigqueue. This resurrects #991. Should be a pretty straightforward addition of pthread_sigqueue.
2 parents 26b8795 + f967994 commit 08c0f2c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libc-test/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3273,6 +3273,12 @@ fn test_linux(target: &str) {
32733273
// Needs musl 1.2.3 or later.
32743274
"pthread_getname_np" if musl => true,
32753275

3276+
// pthread_sigqueue uses sigval, which was initially declared
3277+
// as a struct but should be defined as a union. However due
3278+
// to the issues described here: https://github.com/rust-lang/libc/issues/2816
3279+
// it can't be changed from struct.
3280+
"pthread_sigqueue" => true,
3281+
32763282
_ => false,
32773283
}
32783284
});

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,7 @@ extern "C" {
12911291
attr: *mut ::pthread_rwlockattr_t,
12921292
val: ::c_int,
12931293
) -> ::c_int;
1294+
pub fn pthread_sigqueue(thread: ::pthread_t, sig: ::c_int, value: ::sigval) -> ::c_int;
12941295
pub fn mallinfo() -> ::mallinfo;
12951296
pub fn mallinfo2() -> ::mallinfo2;
12961297
pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int;

0 commit comments

Comments
 (0)