Skip to content

Commit f967994

Browse files
committed
Add pthread_sigqueue.
pthread_sigqueue is a gnu libc extension, however I have a use case for it, hence why I'm adding it.
1 parent d9eb957 commit f967994

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
@@ -3270,6 +3270,12 @@ fn test_linux(target: &str) {
32703270
// Needs musl 1.2.3 or later.
32713271
"pthread_getname_np" if musl => true,
32723272

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

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)