• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: OS Abstract Layer.
15  */
16 
17 #ifndef __SOC_OSAL_H__
18 #define __SOC_OSAL_H__
19 
20 #include "osal_list.h"
21 #include "osal_errno.h"
22 
23 /* osal api header begin */
24 #include "atomic/osal_atomic.h"
25 #include "debug/osal_debug.h"
26 #include "interrupt/osal_interrupt.h"
27 #include "lock/osal_mutex.h"
28 #include "schedule/osal_task.h"
29 #include "event/osal_event.h"
30 #include "msgqueue/osal_msgqueue.h"
31 
32 #if defined(__FREERTOS__)
33 #include "memory/osal_addr.h"
34 #include "memory/osal_barrier.h"
35 #include "memory/osal_cache.h"
36 #include "schedule/osal_completion.h"
37 #include "device/osal_device.h"
38 #include "fileops/osal_fileops.h"
39 #include "math/osal_math.h"
40 #include "proc/osal_proc.h"
41 #include "semaphore/osal_semaphore.h"
42 #include "lock/osal_spinlock.h"
43 #include "string/osal_string.h"
44 #include "time/osal_timer.h"
45 #include "schedule/osal_wait.h"
46 #include "schedule/osal_workqueue.h"
47 #endif
48 
49 #if defined(__linux__)
50 #include "memory/osal_addr.h"
51 #include "memory/osal_barrier.h"
52 #include "device/osal_device.h"
53 #include "fileops/osal_fileops.h"
54 #include "math/osal_math.h"
55 #include "proc/osal_proc.h"
56 #include "semaphore/osal_semaphore.h"
57 #include "lock/osal_spinlock.h"
58 #include "string/osal_string.h"
59 #include "time/osal_timer.h"
60 #include "schedule/osal_wait.h"
61 #include "schedule/osal_workqueue.h"
62 #if defined(__KERNEL__)
63 #include "memory/osal_cache.h"
64 #include "math/osal_bitmap.h"
65 #include "schedule/osal_completion.h"
66 #include "schedule/osal_delaywork.h"
67 #include "lock/osal_rwlock.h"
68 #endif
69 #endif
70 
71 #if defined(__LITEOS__)
72 #include "memory/osal_addr.h"
73 #include "memory/osal_barrier.h"
74 #include "memory/osal_cache.h"
75 #include "schedule/osal_completion.h"
76 #include "device/osal_device.h"
77 #include "event/osal_event.h"
78 #include "fileops/osal_fileops.h"
79 #include "math/osal_math.h"
80 #include "msgqueue/osal_msgqueue.h"
81 #include "proc/osal_proc.h"
82 #include "semaphore/osal_semaphore.h"
83 #include "lock/osal_spinlock.h"
84 #include "string/osal_string.h"
85 #include "time/osal_timer.h"
86 #include "schedule/osal_wait.h"
87 #include "schedule/osal_workqueue.h"
88 #endif
89 
90 #if defined(__NONOS__)
91 #include "lock/osal_spinlock.h"
92 #include "time/osal_timer.h"
93 #include "schedule/osal_wait.h"
94 #include "semaphore/osal_semaphore.h"
95 #endif
96 
97 #if defined(CONFIG_SEC_CORE)
98 #include "memory/osal_addr.h"
99 #include "memory/osal_cache.h"
100 #include "drvbox/osal_drvbox.h"
101 #include "fileops/osal_fileops.h"
102 #include "schedule/osal_wait.h"
103 #endif
104 /* osal api header end */
105 #ifdef OSAL_IRQ_RECORD_DEBUG
106 #include "osal_adapt_debug.h"
107 #endif
108 
109 #ifdef __cplusplus
110 #if __cplusplus
111 extern "C" {
112 #endif
113 #endif
114 
115 #define OSAL_SUCCESS 0
116 #define OSAL_FAILURE (-1)
117 
118 #ifdef __cplusplus
119 #if __cplusplus
120 }
121 #endif
122 #endif
123 #endif /* __SOC_OSAL_H__ */
124