Selaa lähdekoodia

system: make set_thread_priority() linux branch also available for android.

jkds 7 kuukautta sitten
vanhempi
sitoutus
d516d63183
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      src/system/thread_priority.rs

+ 4 - 1
src/system/thread_priority.rs

@@ -56,8 +56,11 @@ pub fn set_thread_priority(priority: ThreadPriority) {
         }
     }
 
-    #[cfg(target_os = "linux")]
+    #[cfg(any(target_os = "linux", target_os = "android"))]
     {
+        // For android see:
+        // https://github.com/android/ndk/issues/1255#issuecomment-1426545936
+
         extern "C" {
             fn setpriority(which: i32, who: u32, prio: i32) -> i32;
         }