RDK Documentation (Open Sourced RDK Components)
ionMemoryMocks.cpp
1 /*
2  * If not stated otherwise in this file or this component's license file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2022 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #include "ionMemoryMocks.h"
21 
22 AampMockIon *g_mockIon;
23 
24 int ion_open()
25 {
26  return g_mockIon->ion_open();
27 }
28 
29 int ion_close(int fd)
30 {
31  return g_mockIon->ion_close(fd);
32 }
33 
34 int ion_alloc(int fd, size_t len, size_t align, unsigned int heap_mask, unsigned int flags, ion_user_handle_t *handle)
35 {
36  return g_mockIon->ion_alloc(fd, len, align, heap_mask, flags, handle);
37 }
38 
39 int ion_free(int fd, ion_user_handle_t handle)
40 {
41  return g_mockIon->ion_free(fd, handle);
42 }
43 
44 int ion_share(int fd, ion_user_handle_t handle, int *share_fd)
45 {
46  return g_mockIon->ion_share(fd, handle, share_fd);
47 }
48 
49 int ion_phys(int fd, ion_user_handle_t handle, unsigned long *addr, unsigned int *size)
50 {
51  return g_mockIon->ion_phys(fd, handle, addr, size);
52 }
AampMockIon
Definition: ionMemoryMocks.h:32