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 <cstdint> 27 #include <functional> 28 #include <map> 29 #include <string> 30 31 #include "test/common/mock_functions.h" 32 33 // Original included files, if any 34 // NOTE: Since this is a mock file with mock definitions some number of 35 // include files may not be required. The include-what-you-use 36 // still applies, but crafting proper inclusion is out of scope 37 // for this effort. This compilation unit may compile as-is, or 38 // may need attention to prune from (or add to ) the inclusion set. 39 40 // Mocked compile conditionals, if any 41 42 namespace test { 43 namespace mock { 44 namespace osi_thread_scheduler { 45 46 // Shared state between mocked functions and tests 47 // Name: osi_enable_real_time_scheduling 48 // Params: pid_t linux_tid 49 // Return: bool 50 struct thread_scheduler_enable_real_time { 51 bool return_value{false}; 52 std::function<bool(pid_t linux_tid)> body{ 53 [this](pid_t linux_tid) { return return_value; }}; operatorthread_scheduler_enable_real_time54 bool operator()(pid_t linux_tid) { return body(linux_tid); }; 55 }; 56 extern struct thread_scheduler_enable_real_time 57 thread_scheduler_enable_real_time; 58 59 // Name: osi_fifo_scheduing_priority_range 60 // Params: int& min, int& max 61 // Return: bool 62 struct thread_scheduler_get_priority_range { 63 bool return_value{false}; 64 std::function<bool(int& min, int& max)> body{ 65 [this](int& min, int& max) { return return_value; }}; operatorthread_scheduler_get_priority_range66 bool operator()(int& min, int& max) { return body(min, max); }; 67 }; 68 extern struct thread_scheduler_get_priority_range 69 thread_scheduler_get_priority_range; 70 71 } // namespace osi_thread_scheduler 72 } // namespace mock 73 } // namespace test 74 75 // END mockcify generation 76