| /* |
| * Copyright (C) 2017 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| package android.frameworks.schedulerservice@1.0; |
| |
| interface ISchedulingPolicyService { |
| enum Priority : int32_t { |
| MIN = 1, |
| MAX = 99, |
| }; |
| |
| /** |
| * Request real-time priority for a specific thread in a process. |
| * |
| * @param pid Process ID. |
| * @param tid Thread ID. |
| * @param priority Value within [Priority:MIN, Priority:MAX] |
| * |
| * @return success whether or not priority was successfully set |
| */ |
| requestPriority(int32_t pid, int32_t tid, int32_t priority) |
| generates (bool success); |
| |
| /** |
| * Must return 0 if no priority is allowed. |
| * |
| * @return priority Max priority that can be set with |
| * requestPriority. |
| */ |
| getMaxAllowedPriority() generates (int32_t priority); |
| }; |