📄 os_time.lst
字号:
C51 COMPILER V7.50 OS_TIME 01/12/2005 21:47:41 PAGE 16
412 =2
413 =2 struct os_tcb *OSTCBNext; /* Pointer to next TCB in the TCB list */
414 =2 struct os_tcb *OSTCBPrev; /* Pointer to previous TCB in the TCB list */
415 =2
416 =2 #if OS_EVENT_EN > 0
=2 OS_EVENT *OSTCBEventPtr; /* Pointer to event control block */
=2 #endif
419 =2
420 =2 #if ((OS_Q_EN > 0) && (OS_MAX_QS > 0)) || (OS_MBOX_EN > 0)
=2 void *OSTCBMsg; /* Message received from OSMboxPost() or OSQPost() */
=2 #endif
423 =2
424 =2 #if (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0)
=2 #if OS_TASK_DEL_EN > 0
=2 OS_FLAG_NODE *OSTCBFlagNode; /* Pointer to event flag node */
=2 #endif
=2 OS_FLAGS OSTCBFlagsRdy; /* Event flags that made task ready to run */
=2 #endif
430 =2
431 =2 INT16U OSTCBDly; /* Nbr ticks to delay task or, timeout waiting for event */
432 =2 INT8U OSTCBStat; /* Task status */
433 =2 INT8U OSTCBPrio; /* Task priority (0 == highest, 63 == lowest) */
434 =2
435 =2 INT8U OSTCBX; /* Bit position in group corresponding to task priority (0..7) */
436 =2 INT8U OSTCBY; /* Index into ready table corresponding to task priority */
437 =2 INT8U OSTCBBitX; /* Bit mask to access bit position in ready table */
438 =2 INT8U OSTCBBitY; /* Bit mask to access bit position in ready group */
439 =2
440 =2 #if (OS_TASK_DEL_EN > 0) && (OS_TASK_DEL_REQ_EN > 0)
=2 BOOLEAN OSTCBDelReq; /* Indicates whether a task needs to delete itself */
=2 #endif
443 =2
444 =2 #if OS_TASK_PROFILE_EN > 0
=2 INT32U OSTCBCtxSwCtr; /* Number of time the task was switched in */
=2 INT32U OSTCBCyclesTot; /* Total number of clock cycles the task has been running */
=2 INT32U OSTCBCyclesStart; /* Snapshot of cycle counter at start of task resumption */
=2 #endif
449 =2 #if (OS_TASK_STAT_STK_CHK_EN > 0) && (OS_TASK_STAT_EN > 0) && (OS_TASK_CREATE_EXT_EN > 0)
=2 OS_STK *OSTCBStkBase; /* Pointer to the beginning of the task stack */
=2 INT32U OSTCBStkUsed; /* Number of bytes used from the stack */
=2 #endif
453 =2
454 =2 #if OS_TASK_NAME_SIZE > 0
=2 char OSTCBTaskName[OS_TASK_NAME_SIZE];
=2 #endif
457 =2 } OS_TCB;
458 =2
459 =2
460 =2 /*
461 =2 *********************************************************************************************************
462 =2 * GLOBAL VARIABLES
463 =2 *********************************************************************************************************
464 =2 */
465 =2
466 =2 OS_EXT INT32U OSCtxSwCtr; /* Counter of number of context switches */
467 =2
468 =2 #if (OS_EVENT_EN > 0) && (OS_MAX_EVENTS > 0)
=2 OS_EXT OS_EVENT *OSEventFreeList; /* Pointer to list of free EVENT control blocks */
=2 OS_EXT OS_EVENT OSEventTbl[OS_MAX_EVENTS];/* Table of EVENT control blocks */
=2 #endif
472 =2
473 =2 #if (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0)
C51 COMPILER V7.50 OS_TIME 01/12/2005 21:47:41 PAGE 17
=2 OS_EXT OS_FLAG_GRP OSFlagTbl[OS_MAX_FLAGS]; /* Table containing event flag groups */
=2 OS_EXT OS_FLAG_GRP *OSFlagFreeList; /* Pointer to free list of event flag groups */
=2 #endif
477 =2
478 =2 #if OS_TASK_STAT_EN > 0
=2 OS_EXT INT8S OSCPUUsage; /* Percentage of CPU used */
=2 OS_EXT INT32U OSIdleCtrMax; /* Max. value that idle ctr can take in 1 sec. */
=2 OS_EXT INT32U OSIdleCtrRun; /* Val. reached by idle ctr at run time in 1 sec. */
=2 OS_EXT BOOLEAN OSStatRdy; /* Flag indicating that the statistic task is rdy */
=2 OS_EXT OS_STK OSTaskStatStk[OS_TASK_STAT_STK_SIZE]; /* Statistics task stack */
=2 #endif
485 =2
486 =2 OS_EXT INT8U OSIntNesting; /* Interrupt nesting level */
487 =2 OS_EXT INT8U OSIntExitY;
488 =2
489 =2 OS_EXT INT8U OSLockNesting; /* Multitasking lock nesting level */
490 =2
491 =2 OS_EXT idata INT8U OSPrioCur; /* Priority of current task
- */
492 =2 OS_EXT idata INT8U OSPrioHighRdy; /* Priority of highest priority task
- */
493 =2
494 =2 OS_EXT INT8U OSRdyGrp; /* Ready list group */
495 =2 OS_EXT INT8U OSRdyTbl[OS_RDY_TBL_SIZE]; /* Table of tasks which are ready to run */
496 =2
497 =2 OS_EXT idata BOOLEAN OSRunning; /* Flag indicating that kernel is running
- */
498 =2
499 =2 OS_EXT INT8U OSTaskCtr; /* Number of tasks created */
500 =2
501 =2 OS_EXT volatile INT32U OSIdleCtr; /* Idle counter */
502 =2
503 =2 OS_EXT OS_STK OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE]; /* Idle task stack */
504 =2
505 =2
506 =2 OS_EXT idata OS_TCB *OSTCBCur; /* Pointer to currently running TCB
- */
507 =2 OS_EXT OS_TCB *OSTCBFreeList; /* Pointer to list of free TCBs */
508 =2 OS_EXT idata OS_TCB *OSTCBHighRdy; /* Pointer to highest priority TCB R-to-R
- */
509 =2 OS_EXT OS_TCB *OSTCBList; /* Pointer to doubly linked list of TCBs */
510 =2 OS_EXT OS_TCB *OSTCBPrioTbl[OS_LOWEST_PRIO + 1];/* Table of pointers to created TCBs */
511 =2 OS_EXT OS_TCB OSTCBTbl[OS_MAX_TASKS + OS_N_SYS_TASKS]; /* Table of TCBs */
512 =2
513 =2 #if OS_TICK_STEP_EN > 0
=2 OS_EXT INT8U OSTickStepState; /* Indicates the state of the tick step feature */
=2 #endif
516 =2
517 =2 #if (OS_MEM_EN > 0) && (OS_MAX_MEM_PART > 0)
=2 OS_EXT OS_MEM *OSMemFreeList; /* Pointer to free list of memory partitions */
=2 OS_EXT OS_MEM OSMemTbl[OS_MAX_MEM_PART];/* Storage for memory partition manager */
=2 #endif
521 =2
522 =2 #if (OS_Q_EN > 0) && (OS_MAX_QS > 0)
=2 OS_EXT OS_Q *OSQFreeList; /* Pointer to list of free QUEUE control blocks */
=2 OS_EXT OS_Q OSQTbl[OS_MAX_QS]; /* Table of QUEUE control blocks */
=2 #endif
526 =2
527 =2 #if OS_TIME_GET_SET_EN > 0
=2 OS_EXT volatile INT32U OSTime; /* Current value of system time (in ticks) */
=2 #endif
530 =2
C51 COMPILER V7.50 OS_TIME 01/12/2005 21:47:41 PAGE 18
531 =2
532 =2 extern INT8U const OSMapTbl[8]; /* Priority->Bit Mask lookup table */
533 =2 extern INT8U const OSUnMapTbl[256]; /* Priority->Index lookup table */
534 =2
535 =2
536 =2 /*
537 =2 *********************************************************************************************************
538 =2 * FUNCTION PROTOTYPES
539 =2 * (Target Independent Functions)
540 =2 *********************************************************************************************************
541 =2 */
542 =2
543 =2 /*
544 =2 *********************************************************************************************************
545 =2 * MISCELLANEOUS
546 =2 *********************************************************************************************************
547 =2 */
548 =2
549 =2 #if (OS_EVENT_EN > 0) && (OS_EVENT_NAME_SIZE > 0)
=2 INT8U OSEventNameGet(OS_EVENT *pevent, char *pname, INT8U *err) reentrant;
=2 void OSEventNameSet(OS_EVENT *pevent, char *pname, INT8U *err) reentrant;
=2 #endif
553 =2
554 =2 /*
555 =2 *********************************************************************************************************
556 =2 * EVENT FLAGS MANAGEMENT
557 =2 *********************************************************************************************************
558 =2 */
559 =2
560 =2 #if (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0)
=2
=2 #if OS_FLAG_ACCEPT_EN > 0
=2 OS_FLAGS OSFlagAccept(OS_FLAG_GRP *pgrp, OS_FLAGS flags, INT8U wait_type, INT8U *err) reentrant;
=2 #endif
=2
=2 OS_FLAG_GRP *OSFlagCreate(OS_FLAGS flags, INT8U *err) reentrant;
=2
=2 #if OS_FLAG_DEL_EN > 0
=2 OS_FLAG_GRP *OSFlagDel(OS_FLAG_GRP *pgrp, INT8U opt, INT8U *err) reentrant;
=2 #endif
=2
=2 #if (OS_FLAG_EN > 0) && (OS_FLAG_NAME_SIZE > 0)
=2 INT8U OSFlagNameGet(OS_FLAG_GRP *pgrp, char *pname, INT8U *err) reentrant;
=2 void OSFlagNameSet(OS_FLAG_GRP *pgrp, char *pname, INT8U *err) reentrant;
=2 #endif
=2
=2 OS_FLAGS OSFlagPend(OS_FLAG_GRP *pgrp, OS_FLAGS flags, INT8U wait_type, INT16U timeout, INT8U *err) r
-eentrant;
=2 OS_FLAGS OSFlagPost(OS_FLAG_GRP *pgrp, OS_FLAGS flags, INT8U operation, INT8U *err) reentrant;
=2
=2 #if OS_FLAF_PEND_GET_FLAGS_RDY > 0
=2 OS_FLAGS OSFlagPendGetFlagsRdy(void) reentrant;
=2 #endif
=2
=2 #if OS_FLAG_QUERY_EN > 0
=2 OS_FLAGS OSFlagQuery(OS_FLAG_GRP *pgrp, INT8U *err) reentrant;
=2 #endif
=2 #endif
588 =2
589 =2 /*
590 =2 *********************************************************************************************************
591 =2 * MESSAGE MAILBOX MANAGEMENT
C51 COMPILER V7.50 OS_TIME 01/12/2005 21:47:41 PAGE 19
592 =2 *********************************************************************************************************
593 =2 */
594 =2
595 =2 #if OS_MBOX_EN > 0
=2
=2 #if OS_MBOX_ACCEPT_EN > 0
=2 void *OSMboxAccept(OS_EVENT *pevent) reentrant;
=2 #endif
=2
=2 OS_EVENT *OSMboxCreate(void *msg) reentrant;
=2
=2 #if OS_MBOX_DEL_EN > 0
=2 OS_EVENT *OSMboxDel(OS_EVENT *pevent, INT8U opt, INT8U *err) reentrant;
=2 #endif
=2
=2 void *OSMboxPend(OS_EVENT *pevent, INT16U timeout, INT8U *err) reentrant;
=2
=2 #if OS_MBOX_POST_EN > 0
=2 INT8U OSMboxPost(OS_EVENT *pevent, void *msg) reentrant;
=2 #endif
=2
=2 #if OS_MBOX_POST_OPT_EN > 0
=2 INT8U OSMboxPostOpt(OS_EVENT *pevent, void *msg, INT8U opt) reentrant;
=2 #endif
=2
=2 #if OS_MBOX_QUERY_EN > 0
=2 INT8U OSMboxQuery(OS_EVENT *pevent, OS_MBOX_DATA *ppdata) reentrant;
=2 #endif
=2 #endif
621 =2
622 =2 /*
623 =2 *********************************************************************************************************
624 =2 * MEMORY MANAGEMENT
625 =2 *********************************************************************************************************
626 =2 */
627 =2
628 =2 #if (OS_MEM_EN > 0) && (OS_MAX_MEM_PART > 0)
=2
=2 OS_MEM *OSMemCreate(void *addr, INT32U nblks, INT32U blksize, INT8U *err) reentrant;
=2 void *OSMemGet(OS_MEM *pmem, INT8U *err) reentrant;
=2 #if OS_MEM_NAME_SIZE > 0
=2 INT8U OSMemNameGet(OS_MEM *pmem, char *pname, INT8U *err) reentrant;
=2 void OSMemNameSet(OS_MEM *pmem, char *pname, INT8U *err) reentrant;
=2 #endif
=2 INT8U OS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -