1 /* 2 * Copyright 2021 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 17 /* 18 * Generated mock file from original source file 19 * Functions generated:2 20 * 21 * mockcify.pl ver 0.3.0 22 */ 23 24 #include <sys/types.h> 25 26 #include <functional> 27 28 // Original included files, if any 29 30 // Mocked compile conditionals, if any 31 32 namespace test { 33 namespace mock { 34 namespace osi_thread_scheduler { 35 36 // Shared state between mocked functions and tests 37 // Name: osi_enable_real_time_scheduling 38 // Params: pid_t linux_tid 39 // Return: bool 40 struct thread_scheduler_enable_real_time { 41 bool return_value{false}; 42 std::function<bool(pid_t linux_tid)> body{ 43 [this](pid_t /* linux_tid */) { return return_value; }}; operatorthread_scheduler_enable_real_time44 bool operator()(pid_t linux_tid) { return body(linux_tid); }; 45 }; 46 extern struct thread_scheduler_enable_real_time 47 thread_scheduler_enable_real_time; 48 49 // Name: osi_fifo_scheduing_priority_range 50 // Params: int& min, int& max 51 // Return: bool 52 struct thread_scheduler_get_priority_range { 53 bool return_value{false}; 54 std::function<bool(int& min, int& max)> body{ 55 [this](int& /* min */, int& /* max */) { return return_value; }}; operatorthread_scheduler_get_priority_range56 bool operator()(int& min, int& max) { return body(min, max); }; 57 }; 58 extern struct thread_scheduler_get_priority_range 59 thread_scheduler_get_priority_range; 60 61 } // namespace osi_thread_scheduler 62 } // namespace mock 63 } // namespace test 64 65 // END mockcify generation 66