Changeset 305 for asp3_wo_tecs/trunk/test/bit_kernel.c
- Timestamp:
- Jun 26, 2017, 6:45:41 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_wo_tecs/trunk/test/bit_kernel.c
r302 r305 4 4 * Advanced Standard Profile Kernel 5 5 * 6 * Copyright (C) 2005-201 5by Embedded and Real-Time Systems Laboratory6 * Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory 7 7 * Graduate School of Information Science, Nagoya Univ., JAPAN 8 8 * … … 51 51 * ã®è²¬ä»»ãè² ããªãï¼ 52 52 * 53 * $Id: bit_kernel.c 456 2015-08-16 06:11:51Z ertl-hiro $53 * $Id: bit_kernel.c 554 2016-01-17 13:21:59Z ertl-hiro $ 54 54 */ 55 55 … … 167 167 #endif /* PRIMAP_BIT */ 168 168 169 Inline bool_t 170 primap_empty(void) 171 { 172 #ifndef PRIMAP_LEVEL_2 173 return(ready_primap == 0U); 174 #else /* PRIMAP_LEVEL_2 */ 175 return(ready_primap1 == 0U); 176 #endif /* PRIMAP_LEVEL_2 */ 177 } 178 179 Inline uint16_t 180 primap_extract_bit(uint_t pri) 181 { 182 #ifndef PRIMAP_LEVEL_2 183 return(ready_primap & PRIMAP_BIT(pri)); 184 #else /* PRIMAP_LEVEL_2 */ 185 return(ready_primap2[pri / TBIT_PRIMAP] & PRIMAP_BIT(pri % TBIT_PRIMAP)); 186 #endif /* PRIMAP_LEVEL_2 */ 187 } 188 169 189 static ER 170 190 bit_schedcb(void) … … 178 198 */ 179 199 if (enadsp) { 180 if ( ready_primap == 0U) {200 if (primap_empty()) { 181 201 if (p_schedtsk != NULL) { 182 202 return(E_SYS_LINENO); … … 189 209 } 190 210 } 211 212 #ifdef PRIMAP_LEVEL_2 213 /* 214 * ready_primap1ã¨ready_primap2ã®æ´åæ§ã®æ¤æ» 215 */ 216 for (pri = 0; pri < TNUM_TPRI; pri += TBIT_PRIMAP) { 217 if (ready_primap2[pri / TBIT_PRIMAP] == 0U) { 218 if ((ready_primap1 & PRIMAP_BIT(pri / TBIT_PRIMAP)) != 0U) { 219 return(E_SYS_LINENO); 220 } 221 } 222 else { 223 if ((ready_primap1 & PRIMAP_BIT(pri / TBIT_PRIMAP)) == 0U) { 224 return(E_SYS_LINENO); 225 } 226 } 227 } 228 #endif /* PRIMAP_LEVEL_2 */ 191 229 192 230 /* … … 196 234 p_queue = ready_queue[pri].p_next; 197 235 if (p_queue == &ready_queue[pri]) { 198 if ( (ready_primap & PRIMAP_BIT(pri)) != 0U) {236 if (primap_extract_bit(pri) != 0U) { 199 237 return(E_SYS_LINENO); 200 238 } 201 239 } 202 240 else { 203 if ( (ready_primap & PRIMAP_BIT(pri)) == 0U) {241 if (primap_extract_bit(pri) == 0U) { 204 242 return(E_SYS_LINENO); 205 243 }
Note:
See TracChangeset
for help on using the changeset viewer.