• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #pragma once
18 
19 /*
20  * Generated mock file from original source file
21  *   Functions generated:2
22  *
23  *  mockcify.pl ver 0.3.0
24  */
25 
26 #include <cstdint>
27 #include <functional>
28 #include <map>
29 #include <string>
30 
31 // Original included files, if any
32 // NOTE: Since this is a mock file with mock definitions some number of
33 //       include files may not be required.  The include-what-you-use
34 //       still applies, but crafting proper inclusion is out of scope
35 //       for this effort.  This compilation unit may compile as-is, or
36 //       may need attention to prune from (or add to ) the inclusion set.
37 #include <mutex>
38 
39 #include "osi/include/mutex.h"
40 #include "test/common/mock_functions.h"
41 
42 // Mocked compile conditionals, if any
43 
44 namespace test {
45 namespace mock {
46 namespace osi_mutex {
47 
48 // Shared state between mocked functions and tests
49 // Name: mutex_global_lock
50 // Params: void
51 // Return: void
52 struct mutex_global_lock {
53   std::function<void(void)> body{[](void) {}};
operatormutex_global_lock54   void operator()(void) { body(); };
55 };
56 extern struct mutex_global_lock mutex_global_lock;
57 
58 // Name: mutex_global_unlock
59 // Params: void
60 // Return: void
61 struct mutex_global_unlock {
62   std::function<void(void)> body{[](void) {}};
operatormutex_global_unlock63   void operator()(void) { body(); };
64 };
65 extern struct mutex_global_unlock mutex_global_unlock;
66 
67 }  // namespace osi_mutex
68 }  // namespace mock
69 }  // namespace test
70 
71 // END mockcify generation