1 /* 2 * Copyright (C) 2015-2017 Alibaba Group Holding Limited 3 */ 4 5 #ifndef K_CONFIG_H 6 #define K_CONFIG_H 7 8 9 /* kernel feature conf */ 10 #ifndef RHINO_CONFIG_SEM 11 #define RHINO_CONFIG_SEM 1 12 #endif 13 #ifndef RHINO_CONFIG_QUEUE 14 #define RHINO_CONFIG_QUEUE 1 15 #endif 16 #ifndef RHINO_CONFIG_TASK_SEM 17 #define RHINO_CONFIG_TASK_SEM 1 18 #endif 19 #ifndef RHINO_CONFIG_EVENT_FLAG 20 #define RHINO_CONFIG_EVENT_FLAG 1 21 #endif 22 #ifndef RHINO_CONFIG_TIMER 23 #define RHINO_CONFIG_TIMER 1 24 #endif 25 #ifndef RHINO_CONFIG_BUF_QUEUE 26 #define RHINO_CONFIG_BUF_QUEUE 1 27 #endif 28 29 /* kernel task conf */ 30 #ifndef RHINO_CONFIG_TASK_INFO 31 #define RHINO_CONFIG_TASK_INFO 1 32 #endif 33 #ifndef RHINO_CONFIG_TASK_DEL 34 #define RHINO_CONFIG_TASK_DEL 1 35 #endif 36 37 #ifndef RHINO_CONFIG_TASK_STACK_OVF_CHECK 38 #define RHINO_CONFIG_TASK_STACK_OVF_CHECK 1 39 #endif 40 #ifndef RHINO_CONFIG_SCHED_RR 41 #define RHINO_CONFIG_SCHED_RR 1 42 #endif 43 #ifndef RHINO_CONFIG_TIME_SLICE_DEFAULT 44 #define RHINO_CONFIG_TIME_SLICE_DEFAULT 50 45 #endif 46 #ifndef RHINO_CONFIG_PRI_MAX 47 #define RHINO_CONFIG_PRI_MAX 62 48 #endif 49 #ifndef RHINO_CONFIG_USER_PRI_MAX 50 #define RHINO_CONFIG_USER_PRI_MAX (RHINO_CONFIG_PRI_MAX - 2) 51 #endif 52 53 /* kernel workqueue conf */ 54 //#ifndef RHINO_CONFIG_WORKQUEUE 55 #define RHINO_CONFIG_WORKQUEUE 1 56 //#endif 57 #ifndef RHINO_CONFIG_WORKQUEUE_STACK_SIZE 58 #define RHINO_CONFIG_WORKQUEUE_STACK_SIZE 768 59 #endif 60 61 /* kernel timer&tick conf */ 62 #ifndef RHINO_CONFIG_TICKS_PER_SECOND 63 #define RHINO_CONFIG_TICKS_PER_SECOND 1000 64 #endif 65 66 /*must reserve enough stack size for timer cb will consume*/ 67 #ifndef RHINO_CONFIG_TIMER_TASK_STACK_SIZE 68 #define RHINO_CONFIG_TIMER_TASK_STACK_SIZE 2048 69 #endif 70 #ifndef RHINO_CONFIG_TIMER_TASK_PRI 71 #define RHINO_CONFIG_TIMER_TASK_PRI 5 72 #endif 73 74 /* kernel intrpt conf */ 75 #ifndef RHINO_CONFIG_INTRPT_STACK_OVF_CHECK 76 #define RHINO_CONFIG_INTRPT_STACK_OVF_CHECK 0 77 #endif 78 79 /* kernel dyn alloc conf */ 80 #ifndef RHINO_CONFIG_KOBJ_DYN_ALLOC 81 #define RHINO_CONFIG_KOBJ_DYN_ALLOC 1 82 #endif 83 84 #if (RHINO_CONFIG_KOBJ_DYN_ALLOC > 0) 85 #ifndef RHINO_CONFIG_K_DYN_TASK_STACK 86 #define RHINO_CONFIG_K_DYN_TASK_STACK 256 87 #endif 88 #ifndef RHINO_CONFIG_K_DYN_MEM_TASK_PRI 89 #define RHINO_CONFIG_K_DYN_MEM_TASK_PRI 6 90 #endif 91 #endif 92 93 /* kernel idle conf */ 94 #ifndef RHINO_CONFIG_IDLE_TASK_STACK_SIZE 95 #define RHINO_CONFIG_IDLE_TASK_STACK_SIZE 1024 96 #endif 97 98 /* kernel hook conf */ 99 #ifndef RHINO_CONFIG_USER_HOOK 100 #define RHINO_CONFIG_USER_HOOK 1 101 #endif 102 103 #ifndef RHINO_CONFIG_CPU_NUM 104 #define RHINO_CONFIG_CPU_NUM 1 105 #endif 106 107 108 /*task user info index start*/ 109 #ifndef RHINO_CONFIG_TASK_INFO_NUM 110 #define RHINO_CONFIG_TASK_INFO_NUM 5 111 #endif 112 113 #ifndef PTHREAD_CONFIG_USER_INFO_POS 114 #define PTHREAD_CONFIG_USER_INFO_POS 0 115 #endif 116 117 #ifndef RHINO_TASK_HOOK_USER_INFO_POS 118 #define RHINO_TASK_HOOK_USER_INFO_POS 1 119 #endif 120 121 #ifndef RHINO_CLI_CONSOLE_USER_INFO_POS 122 #define RHINO_CLI_CONSOLE_USER_INFO_POS 2 123 #endif 124 125 #ifndef RHINO_ERRNO_USER_INFO_POS 126 #define RHINO_ERRNO_USER_INFO_POS 3 127 #endif 128 /*task user info index end*/ 129 130 #ifndef RHINO_CONFIG_SYS_STATS 131 #define RHINO_CONFIG_SYS_STATS 1 132 #endif 133 134 #ifndef RHINO_CONFIG_HW_COUNT 135 #define RHINO_CONFIG_HW_COUNT 1 136 #endif 137 138 139 #ifndef RHINO_CONFIG_MM_TRACE_LVL 140 #define RHINO_CONFIG_MM_TRACE_LVL 0 141 #endif 142 143 #ifndef RHINO_CONFIG_CLI_AS_NMI 144 #define RHINO_CONFIG_CLI_AS_NMI 0 145 #endif 146 147 #if (RHINO_CONFIG_CLI_AS_NMI > 0) 148 #ifndef RHINO_CONFIG_NMI_OFFSET 149 #define RHINO_CONFIG_NMI_OFFSET 40 150 #endif 151 #endif 152 153 #endif /* K_CONFIG_H */ 154