about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2021-03-09 18:31:15 +0000
committerDavid CARLIER <devnexen@gmail.com>2021-03-09 20:27:48 +0000
commit5fab0fa51f14d8770b48501e93cde38d97175e4e (patch)
tree310ffa4ec15ab0f82c4cb30b18b5b62eaa63305e
parent791c5c171d9e4e7391a9c3760a4a8eb4ce2b4058 (diff)
downloadafl++-5fab0fa51f14d8770b48501e93cde38d97175e4e.tar.gz
setting general schedule priority for performance on Mac.
-rw-r--r--src/afl-fuzz.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 09aff4fb..9c822d43 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1403,6 +1403,14 @@ int main(int argc, char **argv_orig, char **envp) {
   set_scheduler_mode(SCHEDULER_MODE_LOW_LATENCY);
   #endif
 
+  #ifdef __APPLE__
+  if (pthread_set_qos_class_self_np(QOS_CLASS_USER_INTERACTIVE, 0) != 0) {
+
+    WARNF("general thread priority settings failed");
+
+  }
+  #endif
+
   init_count_class16();
 
   if (afl->is_main_node && check_main_node_exists(afl) == 1) {