From 1f5e500fa0a7b724d31a4e2be44717a2099b3724 Mon Sep 17 00:00:00 2001 From: Stiopa Koltsov Date: Wed, 22 Feb 2023 23:08:50 +0000 Subject: [PATCH] Add posix_spawnattr_set_qos_class_np https://opensource.apple.com/source/libpthread/libpthread-137.1.1/pthread/spawn.h --- libc-test/build.rs | 1 + libc-test/semver/apple.txt | 2 ++ src/unix/bsd/apple/mod.rs | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 98c802e338157..73c1c8fdb4c6e 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -240,6 +240,7 @@ fn test_apple(target: &str) { "pthread.h", "pthread_spis.h", "pthread/introspection.h", + "pthread/spawn.h", "pthread/stack_np.h", "pwd.h", "regex.h", diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 106a0d2eafefa..b697b893ae7a3 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -2033,12 +2033,14 @@ posix_spawn_file_actions_destroy posix_spawn_file_actions_init posix_spawn_file_actions_t posix_spawnattr_destroy +posix_spawnattr_get_qos_class_np posix_spawnattr_getarchpref_np posix_spawnattr_getflags posix_spawnattr_getpgroup posix_spawnattr_getsigdefault posix_spawnattr_getsigmask posix_spawnattr_init +posix_spawnattr_set_qos_class_np posix_spawnattr_setarchpref_np posix_spawnattr_setflags posix_spawnattr_setpgroup diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 540bf9dcb5e03..519a99346504d 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -5563,6 +5563,14 @@ extern "C" { subpref: *mut ::cpu_subtype_t, ocount: *mut ::size_t, ) -> ::c_int; + pub fn posix_spawnattr_set_qos_class_np( + attr: *mut posix_spawnattr_t, + qos_class: ::qos_class_t, + ) -> ::c_int; + pub fn posix_spawnattr_get_qos_class_np( + attr: *const posix_spawnattr_t, + qos_class: *mut ::qos_class_t, + ) -> ::c_int; pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int;