]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/task_policy.c
xnu-344.tar.gz
[apple/xnu.git] / osfmk / kern / task_policy.c
index 42e38211e0c6d623f7d7645c59d2d43a9e7e3cd9..a0f9672ae6a4a777ca98230017f882a5fb070be5 100644 (file)
@@ -66,8 +66,9 @@ task_policy_set(
                        case TASK_FOREGROUND_APPLICATION:
                        case TASK_BACKGROUND_APPLICATION:
                        case TASK_UNSPECIFIED:
-                               task_priority(task, BASEPRI_DEFAULT +
-                                       ((info->role == TASK_FOREGROUND_APPLICATION)? +16: +15),
+                               task_priority(task,
+                                                               ((info->role == TASK_FOREGROUND_APPLICATION)?
+                                                                       BASEPRI_FOREGROUND: BASEPRI_BACKGROUND),
                                                          task->max_priority);
                                task->role = info->role;
                                break;
@@ -88,7 +89,7 @@ task_policy_set(
                                        task->sec_token.val[0] != 0                     )
                                result = KERN_INVALID_ARGUMENT;
                        else {
-                               task_priority(task, BASEPRI_DEFAULT + 17, task->max_priority);
+                               task_priority(task, BASEPRI_CONTROL, task->max_priority);
                                task->role = info->role;
                        }
                }