• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
3  * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without modification,
6  * are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice, this list of
9  *    conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice, this list
12  *    of conditions and the following disclaimer in the documentation and/or other materials
13  *    provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its contributors may be used
16  *    to endorse or promote products derived from this software without specific prior written
17  *    permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 /**
33  * @defgroup los_config System configuration items
34  * @ingroup kernel
35  */
36 
37 #ifndef _LOS_CONFIG_H
38 #define _LOS_CONFIG_H
39 
40 #include "target_config.h"
41 #include "los_compiler.h"
42 
43 #ifdef __cplusplus
44 #if __cplusplus
45 extern "C" {
46 #endif /* __cplusplus */
47 #endif /* __cplusplus */
48 
49 /* =============================================================================
50                                         System clock module configuration
51 ============================================================================= */
52 /**
53  * @ingroup los_config
54  * System clock (unit: HZ)
55  */
56 #ifndef OS_SYS_CLOCK
57 #define OS_SYS_CLOCK 1000000
58 #endif
59 
60 /**
61  * @ingroup los_config
62  * Number of Ticks in one second
63  */
64 #ifndef LOSCFG_BASE_CORE_TICK_PER_SECOND
65 #define LOSCFG_BASE_CORE_TICK_PER_SECOND                    (100UL)
66 #endif
67 
68 /**
69  * @ingroup los_config
70  * Minimum response error accuracy of tick interrupts, number of ticks in one second.
71  */
72 #ifndef LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI
73 #define LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI               (1000UL) /* 1ms */
74 #endif
75 
76 #if (LOSCFG_BASE_CORE_TICK_PER_SECOND > LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI)
77     #error "LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI must be greater than LOSCFG_BASE_CORE_TICK_PER_SECOND"
78 #endif
79 
80 #if (LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI > 1000UL)
81     #error "LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI must be less than or equal to 1000"
82 #endif
83 
84 #if defined(LOSCFG_BASE_CORE_TICK_PER_SECOND) && \
85     ((LOSCFG_BASE_CORE_TICK_PER_SECOND < 1UL) || (LOSCFG_BASE_CORE_TICK_PER_SECOND > 1000000000UL))
86     #error "LOSCFG_BASE_CORE_TICK_PER_SECOND SHOULD big than 0, and less than 1000000000UL"
87 #endif
88 
89 
90 #if (LOSCFG_BASE_CORE_TICK_PER_SECOND <= 1000UL)
91 /**
92  * @ingroup los_config
93  * How much time one tick spent (unit:ms)
94  */
95 #ifndef LOSCFG_BASE_CORE_TICK_PERIOD_MS
96 #define LOSCFG_BASE_CORE_TICK_PERIOD_MS                     (1000UL / LOSCFG_BASE_CORE_TICK_PER_SECOND)
97 #endif
98 
99 #elif (LOSCFG_BASE_CORE_TICK_PER_SECOND <= 1000000UL)
100 /**
101  * @ingroup los_config
102  * How much time one tick spent (unit:us)
103  */
104 #ifndef LOSCFG_BASE_CORE_TICK_PERIOD_US
105 #define LOSCFG_BASE_CORE_TICK_PERIOD_US                     (1000000UL / LOSCFG_BASE_CORE_TICK_PER_SECOND)
106 #endif
107 
108 #else
109 /**
110  * @ingroup los_config
111  * How much time one tick spent (unit:ns)
112  */
113 #ifndef LOSCFG_BASE_CORE_TICK_PERIOD_NS
114 #define LOSCFG_BASE_CORE_TICK_PERIOD_NS                     (1000000000UL / LOSCFG_BASE_CORE_TICK_PER_SECOND)
115 #endif
116 #endif
117 
118 /**
119  * @ingroup los_config
120  * System timer is a 64/128 bit timer
121  */
122 #ifndef LOSCFG_BASE_CORE_TICK_WTIMER
123 #define LOSCFG_BASE_CORE_TICK_WTIMER                        0
124 #endif
125 
126 /**
127  * @ingroup los_config
128  * System timer count maximum
129  */
130 #ifndef LOSCFG_BASE_CORE_TICK_RESPONSE_MAX
131 #define LOSCFG_BASE_CORE_TICK_RESPONSE_MAX                       0
132 #endif
133 
134 /* =============================================================================
135                                         Hardware interrupt module configuration
136 ============================================================================= */
137 /**
138  * @ingroup los_config
139  * Configuration item for hardware interrupt tailoring
140  */
141 #ifndef LOSCFG_PLATFORM_HWI
142 #define LOSCFG_PLATFORM_HWI                                 1
143 #endif
144 
145 /**
146  * @ingroup los_config
147  * Configuration item for using system defined vector base address and interrupt handlers.
148  * If LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT is set to 0, vector base address will not be
149  * modified by system. In arm, it should be noted that PendSV_Handler and SysTick_Handler should
150  * be redefined to HalPendSV and OsTickHandler respectly in this case, because system depends on
151  * these interrupt handlers to run normally. What's more, LOS_HwiCreate will not register handler.
152  */
153 #ifndef LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT
154 #define LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT                 1
155 #endif
156 
157 #if (LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT == 1)
158     #if (LOSCFG_PLATFORM_HWI == 0)
159         #error "if LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT is set to 1, then LOSCFG_PLATFORM_HWI must also be set to 1"
160     #endif
161 #endif
162 
163 /**
164  * @ingroup los_config
165  * Maximum number of used hardware interrupts, including Tick timer interrupts.
166  */
167 #ifndef LOSCFG_PLATFORM_HWI_LIMIT
168 #define LOSCFG_PLATFORM_HWI_LIMIT                           32
169 #endif
170 
171 /* =============================================================================
172                                        Task module configuration
173 ============================================================================= */
174 /**
175  * @ingroup los_config
176  * Minimum stack size.
177  *
178  * 0x80 bytes, aligned on a boundary of 8.
179  */
180 #ifndef LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE
181 #define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE                 (ALIGN(0x80, 4))
182 #endif
183 
184 /**
185  * @ingroup los_config
186  * Default task priority
187  */
188 #ifndef LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO
189 #define LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO                   10
190 #endif
191 
192 /**
193  * @ingroup los_config
194  * Maximum supported number of tasks except the idle task rather than the number of usable tasks
195  */
196 #ifndef LOSCFG_BASE_CORE_TSK_LIMIT
197 #define LOSCFG_BASE_CORE_TSK_LIMIT                          5
198 #endif
199 
200 /**
201  * @ingroup los_config
202  * Size of the idle task stack
203  */
204 #ifndef LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE
205 #define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE                0x180UL
206 #endif
207 
208 /**
209  * @ingroup los_config
210  * Default task stack size
211  */
212 #ifndef LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE
213 #define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE             0x400UL
214 #endif
215 
216 /**
217  * @ingroup los_config
218  * Configuration item for task Robin tailoring
219  */
220 #ifndef LOSCFG_BASE_CORE_TIMESLICE
221 #define LOSCFG_BASE_CORE_TIMESLICE                         1
222 #endif
223 
224 /**
225  * @ingroup los_config
226  * Longest execution time of tasks with the same priorities
227  */
228 #ifndef LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT
229 #define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT                  20000 /* 20ms */
230 #endif
231 
232 /**
233  * @ingroup los_config
234  * Configuration item for task (stack) monitoring module tailoring
235  */
236 #ifndef LOSCFG_BASE_CORE_TSK_MONITOR
237 #define LOSCFG_BASE_CORE_TSK_MONITOR                        0
238 #endif
239 
240 /**
241  * @ingroup los_config
242  * Configuration item for task perf task filter hook
243  */
244 #ifndef LOSCFG_BASE_CORE_EXC_TSK_SWITCH
245 #define LOSCFG_BASE_CORE_EXC_TSK_SWITCH                     0
246 #endif
247 
248 /*
249  * @ingroup los_config
250  * Configuration item for task context switch hook
251  */
252 #ifndef LOSCFG_BASE_CORE_TSK_SWITCH_HOOK
253 #define LOSCFG_BASE_CORE_TSK_SWITCH_HOOK()
254 #endif
255 
256 /**
257  * @ingroup los_config
258  * Define a usable task priority.Highest task priority.
259  */
260 #ifndef LOS_TASK_PRIORITY_HIGHEST
261 #define LOS_TASK_PRIORITY_HIGHEST                           0
262 #endif
263 
264 /**
265  * @ingroup los_config
266  * Define a usable task priority.Lowest task priority.
267  */
268 #ifndef LOS_TASK_PRIORITY_LOWEST
269 #define LOS_TASK_PRIORITY_LOWEST                            31
270 #endif
271 
272 /**
273  * @ingroup los_config
274  * Configuration item for task stack independent
275  */
276 #ifndef LOSCFG_BASE_CORE_TASKSTACK_INDEPENDENT
277 #define LOSCFG_BASE_CORE_TASKSTACK_INDEPENDENT              0
278 #endif
279 
280 /**
281  * @ingroup los_config
282  * SP align size
283  */
284 #ifndef LOSCFG_STACK_POINT_ALIGN_SIZE
285 #define LOSCFG_STACK_POINT_ALIGN_SIZE                       8
286 #endif
287 
288 /* =============================================================================
289                                        Semaphore module configuration
290 ============================================================================= */
291 /**
292  * @ingroup los_config
293  * Configuration item for semaphore module tailoring
294  */
295 #ifndef LOSCFG_BASE_IPC_SEM
296 #define LOSCFG_BASE_IPC_SEM                                 1
297 #endif
298 
299 /**
300  * @ingroup los_config
301  * Maximum supported number of semaphores
302  */
303 #ifndef LOSCFG_BASE_IPC_SEM_LIMIT
304 #define LOSCFG_BASE_IPC_SEM_LIMIT                           6
305 #endif
306 
307 /**
308  * @ingroup los_config
309  * Maximum number of semaphores.
310  */
311 #ifndef OS_SEM_COUNTING_MAX_COUNT
312 #define OS_SEM_COUNTING_MAX_COUNT                           0xFFFF
313 #endif
314 
315 /* =============================================================================
316                                        Mutex module configuration
317 ============================================================================= */
318 /**
319  * @ingroup los_config
320  * Configuration item for mutex module tailoring
321  */
322 #ifndef LOSCFG_BASE_IPC_MUX
323 #define LOSCFG_BASE_IPC_MUX                                 1
324 #endif
325 
326 /**
327  * @ingroup los_config
328  * Maximum supported number of mutexes
329  */
330 #ifndef LOSCFG_BASE_IPC_MUX_LIMIT
331 #define LOSCFG_BASE_IPC_MUX_LIMIT                           6
332 #endif
333 
334 /* =============================================================================
335                                        Queue module configuration
336 ============================================================================= */
337 /**
338  * @ingroup los_config
339  * Configuration item for queue module tailoring
340  */
341 #ifndef LOSCFG_BASE_IPC_QUEUE
342 #define LOSCFG_BASE_IPC_QUEUE                               1
343 #endif
344 
345 /**
346  * @ingroup los_config
347  * Maximum supported number of queues rather than the number of usable queues
348  */
349 #ifndef LOSCFG_BASE_IPC_QUEUE_LIMIT
350 #define LOSCFG_BASE_IPC_QUEUE_LIMIT                         6
351 #endif
352 
353 /**
354  * @ingroup los_config
355  * Maximum supported number of static queues rather than the number of usable queues
356  */
357 #ifndef LOSCFG_BASE_IPC_STATIC_QUEUE_LIMIT
358 #define LOSCFG_BASE_IPC_STATIC_QUEUE_LIMIT                  3
359 #endif
360 
361 
362 /* =============================================================================
363                                        Software timer module configuration
364 ============================================================================= */
365 /**
366  * @ingroup los_config
367  * Configuration item for software timer module tailoring
368  */
369 #ifndef LOSCFG_BASE_CORE_SWTMR
370 #define LOSCFG_BASE_CORE_SWTMR                              1
371 #endif
372 
373 /**
374  * @ingroup los_config
375  * Maximum supported number of software timers rather than the number of usable software timers
376  */
377 #ifndef LOSCFG_BASE_CORE_SWTMR_LIMIT
378 #define LOSCFG_BASE_CORE_SWTMR_LIMIT                        5
379 #endif
380 
381 /**
382  * @ingroup los_config
383  * Software timer task stack size
384  */
385 #ifndef LOSCFG_BASE_CORE_TSK_SWTMR_STACK_SIZE
386 #define LOSCFG_BASE_CORE_TSK_SWTMR_STACK_SIZE               LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE
387 #endif
388 
389 /**
390  * @ingroup los_config
391  * Configurate item for software timer align tailoring
392  */
393 #ifndef LOSCFG_BASE_CORE_SWTMR_ALIGN
394 #define LOSCFG_BASE_CORE_SWTMR_ALIGN                        0
395 #endif
396 
397 #if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
398     #if (LOSCFG_BASE_CORE_SWTMR == 0)
399         #error "if LOSCFG_BASE_CORE_SWTMR_ALIGN is set to 1, then LOSCFG_BASE_CORE_SWTMR must also be set to 1"
400     #endif
401 #endif
402 
403 /**
404  * @ingroup los_config
405  * Maximum size of a software timer queue
406  */
407 #ifndef OS_SWTMR_HANDLE_QUEUE_SIZE
408 #define OS_SWTMR_HANDLE_QUEUE_SIZE                          (LOSCFG_BASE_CORE_SWTMR_LIMIT + 0)
409 #endif
410 
411 /**
412  * @ingroup los_config
413  * Minimum divisor of software timer multiple alignment
414  */
415 #ifndef LOS_COMMON_DIVISOR
416 #define LOS_COMMON_DIVISOR                                  10
417 #endif
418 
419 #if (LOSCFG_BASE_CORE_SWTMR == 1)
420     #if (LOSCFG_BASE_IPC_QUEUE == 0)
421         #error "if LOSCFG_BASE_CORE_SWTMR is set to 1, then LOSCFG_BASE_IPC_QUEUE must also be set to 1"
422     #endif
423 #endif
424 /* =============================================================================
425                                        Memory module configuration ---- to be refactored
426 ============================================================================= */
427 extern UINT8 *m_aucSysMem0;
428 
429 /**
430  * @ingroup los_config
431  * Configure whether the kernel uses external heap memory
432  */
433 #ifndef LOSCFG_SYS_EXTERNAL_HEAP
434 #define LOSCFG_SYS_EXTERNAL_HEAP                            0
435 #endif
436 
437 /**
438  * @ingroup los_config
439  * Starting address of the memory
440  */
441 #ifndef LOSCFG_SYS_HEAP_ADDR
442 #define LOSCFG_SYS_HEAP_ADDR                                (&m_aucSysMem0[0])
443 #endif
444 
445 /**
446  * @ingroup los_config
447  * Starting address of the task stack
448  */
449 #ifndef OS_TASK_STACK_ADDR
450 #define OS_TASK_STACK_ADDR                                  LOSCFG_SYS_HEAP_ADDR
451 #endif
452 
453 /**
454  * @ingroup los_config
455  * Memory size
456  */
457 #ifndef LOSCFG_SYS_HEAP_SIZE
458 #define LOSCFG_SYS_HEAP_SIZE                                0x10000UL
459 #endif
460 
461 /**
462  * @ingroup los_config
463  * Configuration module tailoring of more memory pool checking
464  */
465 #ifndef LOSCFG_MEM_MUL_POOL
466 #define LOSCFG_MEM_MUL_POOL                                 1
467 #endif
468 
469 /**
470  * @ingroup los_config
471  * Configuration module tailoring of memory released by task id
472  */
473 #ifndef LOSCFG_MEM_FREE_BY_TASKID
474 #define LOSCFG_MEM_FREE_BY_TASKID                           0
475 #endif
476 
477 /**
478  * @ingroup los_config
479  * Configuration module tailoring of mem node integrity checking
480  */
481 #ifndef LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK
482 #define LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK                0
483 #endif
484 
485 /**
486  * @ingroup los_config
487  * The default is 4, which means that the function call stack is recorded from the kernel interface,
488  * such as LOS_MemAlloc/LOS_MemAllocAlign/LOS_MemRealloc/LOS_MemFree. If you want to further ignore
489  * the number of function call layers, you can increase this value appropriately.
490  * @attention
491  * The default is in the IAR tool. Under different compilation environments, this value needs to be adjusted.
492  */
493 #ifndef LOSCFG_MEM_OMIT_LR_CNT
494 #define LOSCFG_MEM_OMIT_LR_CNT                              4
495 #endif
496 
497 /**
498  * @ingroup los_config
499  * The record number of layers of the function call relationship starting from the number of
500  * ignored layers(LOSCFG_MEM_OMIT_LR_CNT).
501  */
502 #ifndef LOSCFG_MEM_RECORD_LR_CNT
503 #define LOSCFG_MEM_RECORD_LR_CNT                            3
504 #endif
505 
506 /**
507  * @ingroup los_config
508  * Configuration memory leak recorded num
509  */
510 #ifndef LOSCFG_MEM_LEAKCHECK_RECORD_MAX_NUM
511 #define LOSCFG_MEM_LEAKCHECK_RECORD_MAX_NUM                 1024
512 #endif
513 
514 /**
515  * @ingroup los_config
516  * Configuration of memory pool record memory consumption waterline
517  */
518 #ifndef LOSCFG_MEM_WATERLINE
519 #define LOSCFG_MEM_WATERLINE                                1
520 #endif
521 
522 /**
523  * @ingroup los_config
524  * Number of memory checking blocks
525  */
526 #ifndef OS_SYS_MEM_NUM
527 #define OS_SYS_MEM_NUM                                      20
528 #endif
529 
530 /**
531  * @ingroup los_config
532  * Size of unaligned memory
533  */
534 #ifndef OS_SYS_NOCACHEMEM_SIZE
535 #define OS_SYS_NOCACHEMEM_SIZE                              0x0UL
536 #endif
537 
538 /**
539  * @ingroup los_config
540  * Starting address of the unaligned memory
541  */
542 #if (OS_SYS_NOCACHEMEM_SIZE > 0)
543 #define OS_SYS_NOCACHEMEM_ADDR                              (&g_sysNoCacheMem0[0])
544 #endif
545 
546 /**
547  * @ingroup los_config
548  * Configuration of multiple non-continuous memory regions as one memory pool
549  */
550 #ifndef LOSCFG_MEM_MUL_REGIONS
551 #define LOSCFG_MEM_MUL_REGIONS                              0
552 #endif
553 
554 /* =============================================================================
555                                         Exception module configuration
556 ============================================================================= */
557 /**
558  * @ingroup los_config
559  * Configuration of hardware stack protection
560  */
561 #ifndef LOSCFG_EXC_HARDWARE_STACK_PROTECTION
562 #define LOSCFG_EXC_HARDWARE_STACK_PROTECTION                0
563 #endif
564 
565 /* =============================================================================
566                                        KAL module configuration
567 ============================================================================= */
568 /**
569  * @ingroup los_config
570  * Configuration CMSIS_OS_VER
571  */
572 #ifndef CMSIS_OS_VER
573 #define CMSIS_OS_VER                                        2
574 #endif
575 
576 /* =============================================================================
577                                        Trace module configuration
578 ============================================================================= */
579 /**
580  * @ingroup los_config
581  * Configuration trace tool
582  */
583 
584 #if (LOSCFG_KERNEL_TRACE == 1)
585 
586 #ifndef NUM_HAL_INTERRUPT_UART
587 #define NUM_HAL_INTERRUPT_UART                              0xff
588 #endif
589 
590 #ifndef OS_TICK_INT_NUM
591 #define OS_TICK_INT_NUM                                     0xff
592 #endif
593 
594 #endif
595 
596 /* =============================================================================
597                                        printf configuration
598 ============================================================================= */
599 /**
600  * @ingroup los_config
601  * Configuration liteos printf
602  */
603 #ifndef LOSCFG_KERNEL_PRINTF
604 #define LOSCFG_KERNEL_PRINTF                                1
605 #endif
606 
607 /* =============================================================================
608                                        misc configuration
609 ============================================================================= */
610 /**
611  * @ingroup los_config
612  * Configuration item for mpu.
613  */
614 #ifndef LOSCFG_MPU_ENABLE
615 #define LOSCFG_MPU_ENABLE                                    0
616 #endif
617 
618 #if (LOSCFG_EXC_HARDWARE_STACK_PROTECTION == 1) && (LOSCFG_MPU_ENABLE == 0)
619 #error "if hardware stack protection is enabled, then MPU should be supported and enabled"
620 #endif
621 
622 /**
623  * @ingroup los_config
624  * Configuration item to get task used memory.
625  */
626 #ifndef LOSCFG_TASK_MEM_USED
627 #define LOSCFG_TASK_MEM_USED                                 0
628 #endif
629 
630 /* *
631  * @ingroup los_interrupt
632  * Configuration item for interrupt with argument
633  */
634 #ifndef LOSCFG_PLATFORM_HWI_WITH_ARG
635 #define LOSCFG_PLATFORM_HWI_WITH_ARG                       0
636 #endif
637 
638 /**
639  * @ingroup los_config
640  * Configuration item to set interrupt vector align size.
641  */
642 #ifndef LOSCFG_ARCH_HWI_VECTOR_ALIGN
643 #define LOSCFG_ARCH_HWI_VECTOR_ALIGN                         0x100
644 #endif
645 
646 /**
647  * @ingroup los_config
648  * Task extension field additional functions, such as IAR TLS.
649  * Please Use the LOSCFG_TASK_STRUCT_EXTENSION macro to define your task extended fields in target_config.h
650  */
651 #ifndef LOSCFG_TASK_CREATE_EXTENSION_HOOK
652 #define LOSCFG_TASK_CREATE_EXTENSION_HOOK(taskCB)
653 #endif
654 #ifndef LOSCFG_TASK_DELETE_EXTENSION_HOOK
655 #define LOSCFG_TASK_DELETE_EXTENSION_HOOK(taskCB)
656 #endif
657 
658 /**
659  * @ingroup los_config
660  * Configuration item to enable kernel signal.
661  */
662 #ifndef LOSCFG_KERNEL_SIGNAL
663 #define LOSCFG_KERNEL_SIGNAL                          0
664 #endif
665 
666 /**
667  * @ingroup los_config
668  * Configuration item to enable kernel power module.
669  */
670 #ifndef LOSCFG_KERNEL_PM
671 #define LOSCFG_KERNEL_PM                              0
672 #endif
673 
674 /**
675  * @ingroup los_config
676  * Configuration item to enable kernel power module in idle task.
677  */
678 #ifndef LOSCFG_KERNEL_PM_IDLE
679 #define LOSCFG_KERNEL_PM_IDLE                         0
680 #endif
681 
682 #ifdef __cplusplus
683 #if __cplusplus
684 }
685 #endif /* __cplusplus */
686 #endif /* __cplusplus */
687 
688 
689 #endif /* _LOS_CONFIG_H */
690