?? os_core.lst
字號:
\ OSTime:
\ 00000000 DS8 4
\ In section .bss, align 2
\ __absolute INT16U OSTmrFree
\ OSTmrFree:
\ 00000000 DS8 2
\ In section .bss, align 2
\ __absolute INT16U OSTmrUsed
\ OSTmrUsed:
\ 00000000 DS8 2
\ In section .bss, align 4
\ __absolute INT32U OSTmrTime
\ OSTmrTime:
\ 00000000 DS8 4
\ In section .bss, align 4
\ __absolute struct os_event *OSTmrSem
\ OSTmrSem:
\ 00000000 DS8 4
\ In section .bss, align 4
\ __absolute struct os_event *OSTmrSemSignal
\ OSTmrSemSignal:
\ 00000000 DS8 4
\ In section .bss, align 4
\ __absolute OS_TMR OSTmrTbl[16]
\ OSTmrTbl:
\ 00000000 DS8 640
\ In section .bss, align 4
\ __absolute struct os_tmr *OSTmrFreeList
\ OSTmrFreeList:
\ 00000000 DS8 4
\ In section .bss, align 4
\ __absolute OS_STK OSTmrTaskStk[128]
\ OSTmrTaskStk:
\ 00000000 DS8 512
\ In section .bss, align 4
\ __absolute OS_TMR_WHEEL OSTmrWheelTbl[8]
\ OSTmrWheelTbl:
\ 00000000 DS8 64
27 #endif
28
29 /*
30 *********************************************************************************************************
31 * PRIORITY RESOLUTION TABLE
32 *
33 * Note: Index into table is bit pattern to resolve highest priority
34 * Indexed value corresponds to highest priority bit position (i.e. 0..7)
35 *********************************************************************************************************
36 */
37
\ In section .text, align 4, keep-with-next
38 INT8U const OSUnMapTbl[256] = {
\ OSUnMapTbl:
\ 00000000 ; Initializer data, 256 bytes
\ 00000000 000001000200 DC8 0, 0, 1, 0, 2, 0, 1, 0, 3, 0
\ 01000300
\ 0000000A 010002000100 DC8 1, 0, 2, 0, 1, 0, 4, 0, 1, 0
\ 04000100
\ 00000014 020001000300 DC8 2, 0, 1, 0, 3, 0, 1, 0, 2, 0
\ 01000200
\ 0000001E 010005000100 DC8 1, 0, 5, 0, 1, 0, 2, 0, 1, 0
\ 02000100
\ 00000028 030001000200 DC8 3, 0, 1, 0, 2, 0, 1, 0, 4, 0
\ 01000400
\ 00000032 010002000100 DC8 1, 0, 2, 0, 1, 0, 3, 0, 1, 0
\ 03000100
\ 0000003C 020001000600 DC8 2, 0, 1, 0, 6, 0, 1, 0, 2, 0
\ 01000200
\ 00000046 010003000100 DC8 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
\ 02000100
\ 00000050 040001000200 DC8 4, 0, 1, 0, 2, 0, 1, 0, 3, 0
\ 01000300
\ 0000005A 010002000100 DC8 1, 0, 2, 0, 1, 0, 5, 0, 1, 0
\ 05000100
\ 00000064 020001000300 DC8 2, 0, 1, 0, 3, 0, 1, 0, 2, 0
\ 01000200
\ 0000006E 010004000100 DC8 1, 0, 4, 0, 1, 0, 2, 0, 1, 0
\ 02000100
\ 00000078 030001000200 DC8 3, 0, 1, 0, 2, 0, 1, 0, 7, 0
\ 01000700
\ 00000082 010002000100 DC8 1, 0, 2, 0, 1, 0, 3, 0, 1, 0
\ 03000100
\ 0000008C 020001000400 DC8 2, 0, 1, 0, 4, 0, 1, 0, 2, 0
\ 01000200
\ 00000096 010003000100 DC8 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
\ 02000100
\ 000000A0 050001000200 DC8 5, 0, 1, 0, 2, 0, 1, 0, 3, 0
\ 01000300
\ 000000AA 010002000100 DC8 1, 0, 2, 0, 1, 0, 4, 0, 1, 0
\ 04000100
\ 000000B4 020001000300 DC8 2, 0, 1, 0, 3, 0, 1, 0, 2, 0
\ 01000200
\ 000000BE 010006000100 DC8 1, 0, 6, 0, 1, 0, 2, 0, 1, 0
\ 02000100
\ 000000C8 030001000200 DC8 3, 0, 1, 0, 2, 0, 1, 0, 4, 0
\ 01000400
\ 000000D2 010002000100 DC8 1, 0, 2, 0, 1, 0, 3, 0, 1, 0
\ 03000100
\ 000000DC 020001000500 DC8 2, 0, 1, 0, 5, 0, 1, 0, 2, 0
\ 01000200
\ 000000E6 010003000100 DC8 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
\ 02000100
\ 000000F0 040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/* 0xB0 to 0xBF */
51 6u, 0u, 1u, 0u, 2u, 0u, 1u, 0u, 3u, 0u, 1u, 0u, 2u, 0u, 1u, 0u, /* 0xC0 to 0xCF */
52 4u, 0u, 1u, 0u, 2u, 0u, 1u, 0u, 3u, 0u, 1u, 0u, 2u, 0u, 1u, 0u, /* 0xD0 to 0xDF */
53 5u, 0u, 1u, 0u, 2u, 0u, 1u, 0u, 3u, 0u, 1u, 0u, 2u, 0u, 1u, 0u, /* 0xE0 to 0xEF */
54 4u, 0u, 1u, 0u, 2u, 0u, 1u, 0u, 3u, 0u, 1u, 0u, 2u, 0u, 1u, 0u /* 0xF0 to 0xFF */
55 };
56
57 /*$PAGE*/
58 /*
59 *********************************************************************************************************
60 * FUNCTION PROTOTYPES
61 *********************************************************************************************************
62 */
63
64 static void OS_InitEventList(void);
65
66 static void OS_InitMisc(void);
67
68 static void OS_InitRdyList(void);
69
70 static void OS_InitTaskIdle(void);
71
72 #if OS_TASK_STAT_EN > 0u
73 static void OS_InitTaskStat(void);
74 #endif
75
76 static void OS_InitTCBList(void);
77
78 static void OS_SchedNew(void);
79
80 /*$PAGE*/
81 /*
82 *********************************************************************************************************
83 * GET THE NAME OF A SEMAPHORE, MUTEX, MAILBOX or QUEUE
84 *
85 * Description: This function is used to obtain the name assigned to a semaphore, mutex, mailbox or queue.
86 *
87 * Arguments : pevent is a pointer to the event group. 'pevent' can point either to a semaphore,
88 * a mutex, a mailbox or a queue. Where this function is concerned, the actual
89 * type is irrelevant.
90 *
91 * pname is a pointer to a pointer to an ASCII string that will receive the name of the semaphore,
92 * mutex, mailbox or queue.
93 *
94 * perr is a pointer to an error code that can contain one of the following values:
95 *
96 * OS_ERR_NONE if the name was copied to 'pname'
97 * OS_ERR_EVENT_TYPE if 'pevent' is not pointing to the proper event
98 * control block type.
99 * OS_ERR_PNAME_NULL You passed a NULL pointer for 'pname'
100 * OS_ERR_PEVENT_NULL if you passed a NULL pointer for 'pevent'
101 * OS_ERR_NAME_GET_ISR if you are trying to call this function from an ISR
102 *
103 * Returns : The length of the string or 0 if the 'pevent' is a NULL pointer.
104 *********************************************************************************************************
105 */
106
107 #if (OS_EVENT_EN) && (OS_EVENT_NAME_EN > 0u)
\ In section .text, align 2, keep-with-next
108 INT8U OSEventNameGet (OS_EVENT *pevent,
109 INT8U **pname,
110 INT8U *perr)
111 {
\ OSEventNameGet:
\ 00000000 2DE9F041 PUSH {R4-R8,LR}
\ 00000004 0400 MOVS R4,R0
\ 00000006 0D00 MOVS R5,R1
\ 00000008 1600 MOVS R6,R2
112 INT8U len;
113 #if OS_CRITICAL_METHOD == 3u /* Allocate storage for CPU status register */
114 OS_CPU_SR cpu_sr = 0u;
\ 0000000A 5FF00008 MOVS R8,#+0
115 #endif
116
117
118
119 #ifdef OS_SAFETY_CRITICAL
120 if (perr == (INT8U *)0) {
121 OS_SAFETY_CRITICAL_EXCEPTION();
122 return (0u);
123 }
124 #endif
125
126 #if OS_ARG_CHK_EN > 0u
127 if (pevent == (OS_EVENT *)0) { /* Is 'pevent' a NULL pointer? */
128 *perr = OS_ERR_PEVENT_NULL;
129 return (0u);
130 }
131 if (pname == (INT8U **)0) { /* Is 'pname' a NULL pointer? */
132 *perr = OS_ERR_PNAME_NULL;
133 return (0u);
134 }
135 #endif
136 if (OSIntNesting > 0u) { /* See if trying to call from an ISR */
\ 0000000E ........ LDR.W R0,??DataTable26
\ 00000012 0078 LDRB R0,[R0, #+0]
\ 00000014 0028 CMP R0,#+0
\ 00000016 03D0 BEQ.N ??OSEventNameGet_0
137 *perr = OS_ERR_NAME_GET_ISR;
\ 00000018 1120 MOVS R0,#+17
\ 0000001A 3070 STRB R0,[R6, #+0]
138 return (0u);
\ 0000001C 0020 MOVS R0,#+0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -