Home | History | Annotate | Download | only in 1.0
      1 /*
      2  * Copyright (C) 2017 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 package android.frameworks.schedulerservice@1.0;
     17 
     18 interface ISchedulingPolicyService {
     19     enum Priority : int32_t {
     20         MIN = 1,
     21         MAX = 99,
     22     };
     23 
     24     /**
     25      * Request real-time priority for a specific thread in a process.
     26      *
     27      * @param pid Process ID.
     28      * @param tid Thread ID.
     29      * @param priority Value within [Priority:MIN, Priority:MAX]
     30      *
     31      * @return success whether or not priority was successfully set
     32      */
     33     requestPriority(int32_t pid, int32_t tid, int32_t priority)
     34         generates (bool success);
     35 
     36     /**
     37      * Must return 0 if no priority is allowed.
     38      *
     39      * @return priority Max priority that can be set with
     40      *                  requestPriority.
     41      */
     42     getMaxAllowedPriority() generates (int32_t priority);
     43 };
     44