📄 ucos_ii.lst
字号:
245 =2 #if (OS_Q_EN && (OS_MAX_QS >= 2)) || OS_MBOX_EN || OS_SEM_EN
=2 OS_EVENT *OSTCBEventPtr; /* Pointer to event control block */
=2 #endif
248 =2
249 =2 #if (OS_Q_EN && (OS_MAX_QS >= 2)) || OS_MBOX_EN
=2 void *OSTCBMsg; /* Message received from OSMboxPost() or OSQPost() */
=2 #endif
252 =2
253 =2 INT16U OSTCBDly; /* Nbr ticks to delay task or, timeout waiting for event */
254 =2 INT8U OSTCBStat; /* Task status */
255 =2 INT8U OSTCBPrio; /* Task priority (0 == highest, 63 == lowest) */
256 =2
257 =2 INT8U OSTCBX; /* Bit position in group corresponding to task priority (0..7) */
258 =2 INT8U OSTCBY; /* Index into ready table corresponding to task priority */
259 =2 INT8U OSTCBBitX; /* Bit mask to access bit position in ready table */
260 =2 INT8U OSTCBBitY; /* Bit mask to access bit position in ready group */
261 =2
262 =2 #if OS_TASK_DEL_EN
=2 BOOLEAN OSTCBDelReq; /* Indicates whether a task needs to delete itself */
=2 #endif
265 =2 } OS_TCB;
266 =2
267 =2 /*$PAGE*/
268 =2 /*
269 =2 *********************************************************************************************************
270 =2 * GLOBAL VARIABLES
271 =2 *********************************************************************************************************
272 =2 */
273 =2
274 =2 OS_EXT INT32U OSCtxSwCtr; /* Counter of number of context switches */
275 =2
276 =2 #if (OS_MAX_EVENTS >= 2)
277 =2 OS_EXT OS_EVENT *OSEventFreeList; /* Pointer to list of free EVENT control blocks */
278 =2 OS_EXT OS_EVENT OSEventTbl[OS_MAX_EVENTS];/* Table of EVENT control blocks */
279 =2 #endif
280 =2
281 =2 OS_EXT INT32U OSIdleCtr; /* Idle counter */
282 =2
283 =2 #if OS_TASK_STAT_EN
=2 OS_EXT INT8S OSCPUUsage; /* Percentage of CPU used */
=2 OS_EXT INT32U OSIdleCtrMax; /* Maximum value that idle counter can take in 1 sec. */
=2 OS_EXT INT32U OSIdleCtrRun; /* Value reached by idle counter at run time in 1 sec. */
=2 OS_EXT BOOLEAN OSStatRdy; /* Flag indicating that the statistic task is ready */
=2 #endif
289 =2
290 =2 OS_EXT INT8U OSIntNesting; /* Interrupt nesting level */
291 =2
292 =2 OS_EXT INT8U OSLockNesting; /* Multitasking lock nesting level */
293 =2
294 =2 OS_EXT idata INT8U OSPrioCur; /* Priority of current task */
295 =2 OS_EXT idata INT8U OSPrioHighRdy; /* Priority of highest priority task */
296 =2
297 =2 OS_EXT INT8U OSRdyGrp; /* Ready list group */
298 =2 OS_EXT INT8U OSRdyTbl[OS_RDY_TBL_SIZE]; /* Table of tasks which are ready to run */
299 =2
300 =2 OS_EXT idata BOOLEAN OSRunning; /* Flag indicating that kernel is running */
301 =2
302 =2 #if OS_TASK_CREATE_EN || OS_TASK_CREATE_EXT_EN || OS_TASK_DEL_EN
303 =2 OS_EXT INT8U OSTaskCtr; /* Number of tasks created */
304 =2 #endif
C51 COMPILER V8.02 UCOS_II 03/10/2008 11:50:50 PAGE 9
305 =2
306 =2 OS_EXT idata OS_TCB *OSTCBCur; /* Pointer to currently running TCB *
-/
307 =2 OS_EXT OS_TCB *OSTCBFreeList; /* Pointer to list of free TCBs *
-/
308 =2 OS_EXT idata OS_TCB *OSTCBHighRdy; /* Pointer to highest priority TCB ready to run *
-/
309 =2 OS_EXT OS_TCB *OSTCBList; /* Pointer to doubly linked list of TCBs *
-/
310 =2 OS_EXT OS_TCB *OSTCBPrioTbl[OS_LOWEST_PRIO + 1];/* Table of pointers to created TCBs *
-/
311 =2
312 =2 OS_EXT INT32U OSTime; /* Current value of system time (in ticks) */
313 =2
314 =2
315 =2 extern INT8U const OSMapTbl[]; /* Priority->Bit Mask lookup table */
316 =2 extern INT8U const OSUnMapTbl[]; /* Priority->Index lookup table */
317 =2
318 =2 /*$PAGE*/
319 =2 /*
320 =2 *********************************************************************************************************
321 =2 * FUNCTION PROTOTYPES
322 =2 * (Target Independant Functions)
323 =2 *********************************************************************************************************
324 =2 */
325 =2
326 =2 /*
327 =2 *********************************************************************************************************
328 =2 * MESSAGE MAILBOX MANAGEMENT
329 =2 *********************************************************************************************************
330 =2 */
331 =2 #if OS_MBOX_EN
=2 void *OSMboxAccept(OS_EVENT *pevent) reentrant;
=2 OS_EVENT *OSMboxCreate(void *msg) reentrant;
=2 void *OSMboxPend(OS_EVENT *pevent, INT16U timeout, INT8U *err) reentrant;
=2 INT8U OSMboxPost(OS_EVENT *pevent, void *msg) reentrant;
=2 INT8U OSMboxQuery(OS_EVENT *pevent, OS_MBOX_DATA *ppdata) reentrant;
=2 #endif
338 =2 /*
339 =2 *********************************************************************************************************
340 =2 * MEMORY MANAGEMENT
341 =2 *********************************************************************************************************
342 =2 */
343 =2 #if OS_MEM_EN && (OS_MAX_MEM_PART >= 2)
=2 OS_MEM *OSMemCreate(void *addr, INT32U nblks, INT32U blksize, INT8U *err) reentrant;
=2 void *OSMemGet(OS_MEM *pmem, INT8U *err) reentrant;
=2 INT8U OSMemPut(OS_MEM *pmem, void *pblk) reentrant;
=2 INT8U OSMemQuery(OS_MEM *pmem, OS_MEM_DATA *ppdata) reentrant;
=2 #endif
349 =2 /*
350 =2 *********************************************************************************************************
351 =2 * MESSAGE QUEUE MANAGEMENT
352 =2 *********************************************************************************************************
353 =2 */
354 =2 #if OS_Q_EN && (OS_MAX_QS >= 2)
=2 void *OSQAccept(OS_EVENT *pevent) reentrant;
=2 OS_EVENT *OSQCreate(void **start, INT16U size) reentrant;
=2 INT8U OSQFlush(OS_EVENT *pevent) reentrant;
=2 void *OSQPend(OS_EVENT *pevent, INT16U timeout, INT8U *err) reentrant;
=2 INT8U OSQPost(OS_EVENT *pevent, void *msg) reentrant;
=2 INT8U OSQPostFront(OS_EVENT *pevent, void *msg) reentrant;
=2 INT8U OSQQuery(OS_EVENT *pevent, OS_Q_DATA *ppdata) reentrant;
C51 COMPILER V8.02 UCOS_II 03/10/2008 11:50:50 PAGE 10
=2 #endif
363 =2 /*$PAGE*/
364 =2 /*
365 =2 *********************************************************************************************************
366 =2 * SEMAPHORE MANAGEMENT
367 =2 *********************************************************************************************************
368 =2 */
369 =2 #if OS_SEM_EN
=2 INT16U OSSemAccept(OS_EVENT *pevent) reentrant;
=2 OS_EVENT *OSSemCreate(INT16U value) reentrant;
=2 void OSSemPend(OS_EVENT *pevent, INT16U timeout, INT8U *err) reentrant;
=2 INT8U OSSemPost(OS_EVENT *pevent) reentrant;
=2 INT8U OSSemQuery(OS_EVENT *pevent, OS_SEM_DATA *ppdata) reentrant;
=2 #endif
376 =2 /*
377 =2 *********************************************************************************************************
378 =2 * TASK MANAGEMENT
379 =2 *********************************************************************************************************
380 =2 */
381 =2 #if OS_TASK_CHANGE_PRIO_EN
=2 INT8U OSTaskChangePrio(INT8U oldprio, INT8U newprio) reentrant;
=2 #endif
384 =2
385 =2 INT8U OSTaskCreate(void (*task)(void *pd), void *ppdata, OS_STK *ptos, INT8U prio) reentrant;
386 =2
387 =2 #if OS_TASK_CREATE_EXT_EN
=2 INT8U OSTaskCreateExt(void (*task)(void *pd),
=2 void *ppdata,
=2 OS_STK *ptos,
=2 INT8U prio,
=2 INT16U id,
=2 OS_STK *pbos,
=2 INT32U stk_size,
=2 void *pext,
=2 INT16U opt) reentrant;
=2 #endif
398 =2
399 =2 #if OS_TASK_DEL_EN
=2 INT8U OSTaskDel(INT8U prio) reentrant;
=2 INT8U OSTaskDelReq(INT8U prio) reentrant;
=2 #endif
403 =2
404 =2 #if OS_TASK_SUSPEND_EN
=2 INT8U OSTaskResume(INT8U prio) reentrant;
=2 INT8U OSTaskSuspend(INT8U prio) reentrant;
=2 #endif
408 =2
409 =2 #if OS_TASK_CREATE_EXT_EN
=2 INT8U OSTaskStkChk(INT8U prio, OS_STK_DATA *ppdata) reentrant;
=2 #endif
412 =2
413 =2 INT8U OSTaskQuery(INT8U prio, OS_TCB *ppdata) reentrant;
414 =2
415 =2 /*
416 =2 *********************************************************************************************************
417 =2 * TIME MANAGEMENT
418 =2 *********************************************************************************************************
419 =2 */
420 =2 void OSTimeDly(INT16U ticks) reentrant;
421 =2 INT8U OSTimeDlyHMSM(INT8U hours, INT8U minutes, INT8U seconds, INT16U milli) reentrant;
422 =2 INT8U OSTimeDlyResume(INT8U prio) reentrant;
423 =2 INT32U OSTimeGet(void) reentrant;
C51 COMPILER V8.02 UCOS_II 03/10/2008 11:50:50 PAGE 11
424 =2 void OSTimeSet(INT32U ticks) reentrant;
425 =2 void OSTimeTick(void) reentrant;
426 =2
427 =2 /*
428 =2 *********************************************************************************************************
429 =2 * MISCELLANEOUS
430 =2 *********************************************************************************************************
431 =2 */
432 =2
433 =2 void OSInit(void) reentrant;
434 =2
435 =2 void OSIntEnter(void) reentrant;
436 =2 void OSIntExit(void) reentrant;
437 =2
438 =2 void OSSchedLock(void) reentrant;
439 =2 void OSSchedUnlock(void) reentrant;
440 =2
441 =2 void OSStart(void) reentrant;
442 =2
443 =2 void OSStatInit(void) reentrant;
444 =2
445 =2 INT16U OSVersion(void) reentrant;
446 =2
447 =2 /*$PAGE*/
448 =2 /*
449 =2 *********************************************************************************************************
450 =2 * INTERNAL FUNCTION PROTOTYPES
451 =2 * (Your application MUST NOT call these functions)
452 =2 *********************************************************************************************************
453 =2 */
454 =2
455 =2 #if OS_MBOX_EN || OS_Q_EN || OS_SEM_EN
=2 void OSEventTaskRdy(OS_EVENT *pevent, void *msg, INT8U msk) reentrant;
=2 void OSEventTaskWait(OS_EVENT *pevent) reentrant;
=2 void OSEventTO(OS_EVENT *pevent) reentrant;
=2 void OSEventWaitListInit(OS_EVENT *pevent) reentrant;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -