1/*
2 * FreeRTOS Kernel V11.1.0
3 * Copyright (C) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * SPDX-License-Identifier: MIT
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of
8 * this software and associated documentation files (the "Software"), to deal in
9 * the Software without restriction, including without limitation the rights to
10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 * the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * https://www.FreeRTOS.org
25 * https://github.com/FreeRTOS
26 *
27 */
28
29/* ----------------------------------------------------------------------------------- */
30
31    .arm
32    .syntax unified
33    .section freertos_system_calls
34
35#define FREERTOS_ASSEMBLY
36    #include "FreeRTOSConfig.h"
37    #include "portmacro_asm.h"
38    #include "mpu_syscall_numbers.h"
39#undef FREERTOS_ASSEMBLY
40
41/* ----------------------- Start of Port Specific System Calls ----------------------- */
42
43/*
44 * void vPortYield( void );
45 */
46.align 4
47.global vPortYield
48.type vPortYield, %function
49vPortYield:
50    SVC     #portSVC_YIELD
51    BX      LR
52
53/* ----------------------------------------------------------------------------------- */
54
55/*
56 * void vPortSystemCallExit( void );
57 */
58.align 4
59.global vPortSystemCallExit
60.type vPortSystemCallExit, %function
61vPortSystemCallExit:
62    SVC     #portSVC_SYSTEM_CALL_EXIT
63    BX      LR
64
65/* ----------------------------------------------------------------------------------- */
66
67/*
68 * BaseType_t xPortIsPrivileged( void );
69 *
70 * According to the Procedure Call Standard for the ARM Architecture (AAPCS):
71 * - Return value must be in R0.
72 */
73.align 4
74.global xPortIsPrivileged
75.type xPortIsPrivileged, %function
76xPortIsPrivileged:
77    MRS     R0, CPSR        /* R0 = CPSR. */
78    AND     R0, R0, #0x1F   /* R0 = R0 & 0x1F. Extract mode bits.*/
79    CMP     R0, #USER_MODE  /* If R0 == #USER_MODE. */
80    MOVEQ   R0, #0x0        /* Then, set R0 to 0 to indicate that the processer is not privileged. */
81    MOVNE   R0, #0x01       /* Otherwise, set R0 to 1 to indicate that the processer is privileged. */
82    BX      LR
83
84/* ----------------------------------------------------------------------------------- */
85
86/*
87 * UBaseType_t ulPortCountLeadingZeros( UBaseType_t ulBitmap );
88 *
89 * According to the Procedure Call Standard for the ARM Architecture (AAPCS):
90 * - Parameter ulBitmap is passed in R0.
91 * - Return value must be in R0.
92 */
93.align 4
94.weak ulPortCountLeadingZeros
95.type ulPortCountLeadingZeros, %function
96ulPortCountLeadingZeros:
97    CLZ     R0, R0
98    BX      LR
99
100/* ------------------- End of Port Specific System Calls ------------------- */
101
102.macro INVOKE_SYSTEM_CALL systemCallNumber, systemCallImpl
103    PUSH    {R0}
104    MRS     R0, CPSR
105    AND     R0, R0, #0x1F
106    CMP     R0, #USER_MODE
107    POP     {R0}
108    SVCEQ   \systemCallNumber
109    B       \systemCallImpl
110.endm
111
112/* ----------------------------------------------------------------------------------- */
113
114.extern MPU_xTaskGetTickCountImpl
115.align 4
116.global MPU_xTaskGetTickCount
117.type MPU_xTaskGetTickCount, function
118MPU_xTaskGetTickCount:
119    INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskGetTickCount, MPU_xTaskGetTickCountImpl
120
121/* ----------------------------------------------------------------------------------- */
122
123.extern MPU_uxTaskGetNumberOfTasksImpl
124.align 4
125.global MPU_uxTaskGetNumberOfTasks
126.type MPU_uxTaskGetNumberOfTasks, function
127MPU_uxTaskGetNumberOfTasks:
128    INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxTaskGetNumberOfTasks, MPU_uxTaskGetNumberOfTasksImpl
129
130/* ----------------------------------------------------------------------------------- */
131
132.extern MPU_vTaskSetTimeOutStateImpl
133.align 4
134.global MPU_vTaskSetTimeOutState
135.type MPU_vTaskSetTimeOutState, function
136MPU_vTaskSetTimeOutState:
137    INVOKE_SYSTEM_CALL #SYSTEM_CALL_vTaskSetTimeOutState, MPU_vTaskSetTimeOutStateImpl
138
139/* ----------------------------------------------------------------------------------- */
140
141.extern MPU_xTaskCheckForTimeOutImpl
142.align 4
143.global MPU_xTaskCheckForTimeOut
144.type MPU_xTaskCheckForTimeOut, function
145MPU_xTaskCheckForTimeOut:
146    INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskCheckForTimeOut, MPU_xTaskCheckForTimeOutImpl
147
148/* ----------------------------------------------------------------------------------- */
149
150.extern MPU_xQueueGenericSendImpl
151.align 4
152.global MPU_xQueueGenericSend
153.type MPU_xQueueGenericSend, function
154MPU_xQueueGenericSend:
155    INVOKE_SYSTEM_CALL #SYSTEM_CALL_xQueueGenericSend, MPU_xQueueGenericSendImpl
156
157/* ----------------------------------------------------------------------------------- */
158
159.extern MPU_uxQueueMessagesWaitingImpl
160.align 4
161.global MPU_uxQueueMessagesWaiting
162.type MPU_uxQueueMessagesWaiting, function
163MPU_uxQueueMessagesWaiting:
164    INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxQueueMessagesWaiting, MPU_uxQueueMessagesWaitingImpl
165
166/* ----------------------------------------------------------------------------------- */
167
168.extern MPU_uxQueueSpacesAvailableImpl
169.align 4
170.global MPU_uxQueueSpacesAvailable
171.type MPU_uxQueueSpacesAvailable, function
172MPU_uxQueueSpacesAvailable:
173    INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxQueueSpacesAvailable, MPU_uxQueueSpacesAvailableImpl
174
175/* ----------------------------------------------------------------------------------- */
176
177.extern MPU_xQueueReceiveImpl
178.align 4
179.global MPU_xQueueReceive
180.type MPU_xQueueReceive, function
181MPU_xQueueReceive:
182    INVOKE_SYSTEM_CALL #SYSTEM_CALL_xQueueReceive, MPU_xQueueReceiveImpl
183
184/* ----------------------------------------------------------------------------------- */
185
186.extern MPU_xQueuePeekImpl
187.align 4
188.global MPU_xQueuePeek
189.type MPU_xQueuePeek, function
190MPU_xQueuePeek:
191    INVOKE_SYSTEM_CALL #SYSTEM_CALL_xQueuePeek, MPU_xQueuePeekImpl
192
193/* ----------------------------------------------------------------------------------- */
194
195.extern MPU_xQueueSemaphoreTakeImpl
196.align 4
197.global MPU_xQueueSemaphoreTake
198.type MPU_xQueueSemaphoreTake, function
199MPU_xQueueSemaphoreTake:
200    INVOKE_SYSTEM_CALL #SYSTEM_CALL_xQueueSemaphoreTake, MPU_xQueueSemaphoreTakeImpl
201
202/* ----------------------------------------------------------------------------------- */
203
204#if ( configUSE_EVENT_GROUPS == 1 )
205
206    .extern MPU_xEventGroupWaitBitsImpl
207    .align 4
208    .global MPU_xEventGroupWaitBitsEntry
209    .type MPU_xEventGroupWaitBitsEntry, function
210    MPU_xEventGroupWaitBitsEntry:
211        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupWaitBits, MPU_xEventGroupWaitBitsImpl
212
213    /* ----------------------------------------------------------------------------------- */
214
215    .extern MPU_xEventGroupClearBitsImpl
216    .align 4
217    .global MPU_xEventGroupClearBits
218    .type MPU_xEventGroupClearBits, function
219    MPU_xEventGroupClearBits:
220        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupClearBits, MPU_xEventGroupClearBitsImpl
221
222    /* ----------------------------------------------------------------------------------- */
223
224    .extern MPU_xEventGroupSetBitsImpl
225    .align 4
226    .global MPU_xEventGroupSetBits
227    .type MPU_xEventGroupSetBits, function
228    MPU_xEventGroupSetBits:
229        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupSetBits, MPU_xEventGroupSetBitsImpl
230
231    /* ----------------------------------------------------------------------------------- */
232
233    .extern MPU_xEventGroupSyncImpl
234    .align 4
235    .global MPU_xEventGroupSync
236    .type MPU_xEventGroupSync, function
237    MPU_xEventGroupSync:
238        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupSync, MPU_xEventGroupSyncImpl
239
240#endif /* if ( configUSE_EVENT_GROUPS == 1 ) */
241
242/* ----------------------------------------------------------------------------------- */
243
244#if ( configUSE_STREAM_BUFFERS == 1 )
245
246    .extern MPU_xStreamBufferSendImpl
247    .align 4
248    .global MPU_xStreamBufferSend
249    .type MPU_xStreamBufferSend, function
250    MPU_xStreamBufferSend:
251        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferSend, MPU_xStreamBufferSendImpl
252
253    /* ----------------------------------------------------------------------------------- */
254
255    .extern MPU_xStreamBufferReceiveImpl
256    .align 4
257    .global MPU_xStreamBufferReceive
258    .type MPU_xStreamBufferReceive, function
259    MPU_xStreamBufferReceive:
260        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferReceive, MPU_xStreamBufferReceiveImpl
261
262    /* ----------------------------------------------------------------------------------- */
263
264    .extern MPU_xStreamBufferIsFullImpl
265    .align 4
266    .global MPU_xStreamBufferIsFull
267    .type MPU_xStreamBufferIsFull, function
268    MPU_xStreamBufferIsFull:
269        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferIsFull, MPU_xStreamBufferIsFullImpl
270
271    /* ----------------------------------------------------------------------------------- */
272
273    .extern MPU_xStreamBufferIsEmptyImpl
274    .align 4
275    .global MPU_xStreamBufferIsEmpty
276    .type MPU_xStreamBufferIsEmpty, function
277    MPU_xStreamBufferIsEmpty:
278        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferIsEmpty, MPU_xStreamBufferIsEmptyImpl
279
280    /* ----------------------------------------------------------------------------------- */
281
282    .extern MPU_xStreamBufferSpacesAvailableImpl
283    .align 4
284    .global MPU_xStreamBufferSpacesAvailable
285    .type MPU_xStreamBufferSpacesAvailable, function
286    MPU_xStreamBufferSpacesAvailable:
287        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferSpacesAvailable, MPU_xStreamBufferSpacesAvailableImpl
288
289    /* ----------------------------------------------------------------------------------- */
290
291    .extern MPU_xStreamBufferBytesAvailableImpl
292    .align 4
293    .global MPU_xStreamBufferBytesAvailable
294    .type MPU_xStreamBufferBytesAvailable, function
295    MPU_xStreamBufferBytesAvailable:
296        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferBytesAvailable, MPU_xStreamBufferBytesAvailableImpl
297
298    /* ----------------------------------------------------------------------------------- */
299
300    .extern MPU_xStreamBufferSetTriggerLevelImpl
301    .align 4
302    .global MPU_xStreamBufferSetTriggerLevel
303    .type MPU_xStreamBufferSetTriggerLevel, function
304    MPU_xStreamBufferSetTriggerLevel:
305        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferSetTriggerLevel, MPU_xStreamBufferSetTriggerLevelImpl
306
307    /* ----------------------------------------------------------------------------------- */
308
309    .extern MPU_xStreamBufferNextMessageLengthBytesImpl
310    .align 4
311    .global MPU_xStreamBufferNextMessageLengthBytes
312    .type MPU_xStreamBufferNextMessageLengthBytes, function
313    MPU_xStreamBufferNextMessageLengthBytes:
314        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferNextMessageLengthBytes, MPU_xStreamBufferNextMessageLengthBytesImpl
315
316#endif /* if ( configUSE_STREAM_BUFFERS == 1 ) */
317
318/* ----------------------------------------------------------------------------------- */
319
320#if ( ( INCLUDE_xTaskDelayUntil == 1 ) || ( INCLUDE_vTaskDelayUntil == 1 ) )
321
322    .extern MPU_xTaskDelayUntilImpl
323    .align 4
324    .global MPU_xTaskDelayUntil
325    .type MPU_xTaskDelayUntil, function
326    MPU_xTaskDelayUntil:
327        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskDelayUntil, MPU_xTaskDelayUntilImpl
328
329#endif /* if ( ( INCLUDE_xTaskDelayUntil == 1 ) || ( INCLUDE_vTaskDelayUntil == 1 ) ) */
330
331/* ----------------------------------------------------------------------------------- */
332
333#if ( INCLUDE_xTaskAbortDelay == 1 )
334
335    .extern MPU_xTaskAbortDelayImpl
336    .align 4
337    .global MPU_xTaskAbortDelay
338    .type MPU_xTaskAbortDelay, function
339    MPU_xTaskAbortDelay:
340        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskAbortDelay, MPU_xTaskAbortDelayImpl
341
342#endif /* if ( INCLUDE_xTaskAbortDelay == 1 ) */
343
344/* ------------------------------------------------------------------------------- */
345
346#if ( INCLUDE_vTaskDelay == 1 )
347
348    .extern MPU_vTaskDelayImpl
349    .align 4
350    .global MPU_vTaskDelay
351    .type MPU_vTaskDelay, function
352    MPU_vTaskDelay:
353        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vTaskDelay, MPU_vTaskDelayImpl
354
355#endif /* if ( INCLUDE_vTaskDelay == 1 ) */
356
357/* ------------------------------------------------------------------------------- */
358
359#if ( INCLUDE_uxTaskPriorityGet == 1 )
360
361    .extern MPU_uxTaskPriorityGetImpl
362    .align 4
363    .global MPU_uxTaskPriorityGet
364    .type MPU_uxTaskPriorityGet, function
365    MPU_uxTaskPriorityGet:
366        INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxTaskPriorityGet, MPU_uxTaskPriorityGetImpl
367
368#endif /* if ( INCLUDE_uxTaskPriorityGet == 1 ) */
369
370/* ------------------------------------------------------------------------------- */
371
372#if ( INCLUDE_eTaskGetState == 1 )
373
374    .extern MPU_eTaskGetStateImpl
375    .align 4
376    .global MPU_eTaskGetState
377    .type MPU_eTaskGetState, function
378    MPU_eTaskGetState:
379        INVOKE_SYSTEM_CALL #SYSTEM_CALL_eTaskGetState, MPU_eTaskGetStateImpl
380
381#endif /* if ( INCLUDE_eTaskGetState == 1 ) */
382
383/* ------------------------------------------------------------------------------- */
384
385#if ( configUSE_TRACE_FACILITY == 1 )
386
387    .extern MPU_vTaskGetInfoImpl
388    .align 4
389    .global MPU_vTaskGetInfo
390    .type MPU_vTaskGetInfo, function
391    MPU_vTaskGetInfo:
392        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vTaskGetInfo, MPU_vTaskGetInfoImpl
393
394    /* ------------------------------------------------------------------------------- */
395
396    .extern MPU_uxTaskGetSystemStateImpl
397    .align 4
398    .global MPU_uxTaskGetSystemState
399    .type MPU_uxTaskGetSystemState, function
400    MPU_uxTaskGetSystemState:
401        INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxTaskGetSystemState, MPU_uxTaskGetSystemStateImpl
402
403#endif /* if ( configUSE_TRACE_FACILITY == 1 ) */
404
405/* ------------------------------------------------------------------------------- */
406
407#if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
408    .extern MPU_uxEventGroupGetNumberImpl
409    .align 4
410    .global MPU_uxEventGroupGetNumber
411    .type MPU_uxEventGroupGetNumber, function
412    MPU_uxEventGroupGetNumber:
413    INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxEventGroupGetNumber, MPU_uxEventGroupGetNumberImpl
414
415    /* ------------------------------------------------------------------------------- */
416
417
418
419    .extern MPU_vEventGroupSetNumberImpl
420    .align 4
421    .global MPU_vEventGroupSetNumber
422    .type MPU_vEventGroupSetNumber, function
423    MPU_vEventGroupSetNumber:
424        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vEventGroupSetNumber, MPU_vEventGroupSetNumberImpl
425
426    /* ------------------------------------------------------------------------------- */
427
428#endif /* if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
429
430/* ------------------------------------------------------------------------------- */
431
432#if ( INCLUDE_xTaskGetIdleTaskHandle == 1 )
433
434    .extern MPU_xTaskGetIdleTaskHandleImpl
435    .align 4
436    .global MPU_xTaskGetIdleTaskHandle
437    .type MPU_xTaskGetIdleTaskHandle, function
438    MPU_xTaskGetIdleTaskHandle:
439        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskGetIdleTaskHandle, MPU_xTaskGetIdleTaskHandleImpl
440
441
442#endif /* if ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) */
443
444/* ------------------------------------------------------------------------------- */
445
446#if ( INCLUDE_vTaskSuspend == 1 )
447
448    .extern MPU_vTaskSuspendImpl
449    .align 4
450    .global MPU_vTaskSuspend
451    .type MPU_vTaskSuspend, function
452    MPU_vTaskSuspend:
453        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vTaskSuspend, MPU_vTaskSuspendImpl
454
455    /* ------------------------------------------------------------------------------- */
456
457    .extern MPU_vTaskResumeImpl
458    .align 4
459    .global MPU_vTaskResume
460    .type MPU_vTaskResume, function
461    MPU_vTaskResume:
462        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vTaskResume, MPU_vTaskResumeImpl
463
464    /* ------------------------------------------------------------------------------- */
465
466#endif /* if ( INCLUDE_vTaskSuspend == 1 ) */
467
468/* ------------------------------------------------------------------------------- */
469
470#if ( configGENERATE_RUN_TIME_STATS == 1 )
471
472    .extern MPU_ulTaskGetRunTimeCounterImpl
473    .align 4
474    .global MPU_ulTaskGetRunTimeCounter
475    .type MPU_ulTaskGetRunTimeCounter, function
476    MPU_ulTaskGetRunTimeCounter:
477        INVOKE_SYSTEM_CALL #SYSTEM_CALL_ulTaskGetRunTimeCounter, MPU_ulTaskGetRunTimeCounterImpl
478
479    /* ------------------------------------------------------------------------------- */
480
481    .extern MPU_ulTaskGetRunTimePercentImpl
482    .align 4
483    .global MPU_ulTaskGetRunTimePercent
484    .type MPU_ulTaskGetRunTimePercent, function
485    MPU_ulTaskGetRunTimePercent:
486        INVOKE_SYSTEM_CALL #SYSTEM_CALL_ulTaskGetRunTimePercent, MPU_ulTaskGetRunTimePercentImpl
487
488    /* ------------------------------------------------------------------------------- */
489
490    #if ( INCLUDE_xTaskGetIdleTaskHandle == 1 )
491
492        .extern MPU_ulTaskGetIdleRunTimePercentImpl
493        .align 4
494        .global MPU_ulTaskGetIdleRunTimePercent
495        .type MPU_ulTaskGetIdleRunTimePercent, function
496        MPU_ulTaskGetIdleRunTimePercent:
497            INVOKE_SYSTEM_CALL #SYSTEM_CALL_ulTaskGetIdleRunTimePercent, MPU_ulTaskGetIdleRunTimePercentImpl
498
499        /* --------------------------------------------------------------------------- */
500
501        .extern MPU_ulTaskGetIdleRunTimeCounterImpl
502        .align 4
503        .global MPU_ulTaskGetIdleRunTimeCounter
504        .type MPU_ulTaskGetIdleRunTimeCounter, function
505        MPU_ulTaskGetIdleRunTimeCounter:
506            INVOKE_SYSTEM_CALL #SYSTEM_CALL_ulTaskGetIdleRunTimeCounter, MPU_ulTaskGetIdleRunTimeCounterImpl
507
508        /* --------------------------------------------------------------------------- */
509
510    #endif /* if ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) */
511
512#endif /* if ( configGENERATE_RUN_TIME_STATS == 1 )*/
513
514/* --------------------------------------------------------------------------- */
515
516#if ( configUSE_APPLICATION_TASK_TAG == 1 )
517
518    .extern MPU_vTaskSetApplicationTaskTagImpl
519    .align 4
520    .global MPU_vTaskSetApplicationTaskTag
521    .type MPU_vTaskSetApplicationTaskTag, function
522    MPU_vTaskSetApplicationTaskTag:
523        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vTaskSetApplicationTaskTag, MPU_vTaskSetApplicationTaskTagImpl
524
525    /* ------------------------------------------------------------------------------- */
526
527    .extern MPU_xTaskGetApplicationTaskTagImpl
528    .align 4
529    .global MPU_xTaskGetApplicationTaskTag
530    .type MPU_xTaskGetApplicationTaskTag, function
531    MPU_xTaskGetApplicationTaskTag:
532        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskGetApplicationTaskTag, MPU_xTaskGetApplicationTaskTagImpl
533
534    /* ------------------------------------------------------------------------------- */
535
536#endif /* if ( configUSE_APPLICATION_TASK_TAG == 1 ) */
537
538/* ------------------------------------------------------------------------------- */
539
540#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )
541
542    .extern MPU_vTaskSetThreadLocalStoragePointerImpl
543    .align 4
544    .global MPU_vTaskSetThreadLocalStoragePointer
545    .type MPU_vTaskSetThreadLocalStoragePointer, function
546    MPU_vTaskSetThreadLocalStoragePointer:
547        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vTaskSetThreadLocalStoragePointer, MPU_vTaskSetThreadLocalStoragePointerImpl
548
549    /* ------------------------------------------------------------------------------- */
550
551    .extern MPU_pvTaskGetThreadLocalStoragePointerImpl
552    .align 4
553    .global MPU_pvTaskGetThreadLocalStoragePointer
554    .type MPU_pvTaskGetThreadLocalStoragePointer, function
555    MPU_pvTaskGetThreadLocalStoragePointer:
556        INVOKE_SYSTEM_CALL #SYSTEM_CALL_pvTaskGetThreadLocalStoragePointer, MPU_pvTaskGetThreadLocalStoragePointerImpl
557
558    /* ------------------------------------------------------------------------------- */
559
560#endif /* if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 ) */
561
562/* ------------------------------------------------------------------------------- */
563
564#if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 )
565
566    .extern MPU_uxTaskGetStackHighWaterMarkImpl
567    .align 4
568    .global MPU_uxTaskGetStackHighWaterMark
569    .type MPU_uxTaskGetStackHighWaterMark, function
570    MPU_uxTaskGetStackHighWaterMark:
571        INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxTaskGetStackHighWaterMark, MPU_uxTaskGetStackHighWaterMarkImpl
572
573#endif /* if ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) */
574
575/* ------------------------------------------------------------------------------- */
576
577#if ( INCLUDE_uxTaskGetStackHighWaterMark2 == 1 )
578
579    .extern MPU_uxTaskGetStackHighWaterMark2Impl
580    .align 4
581    .global MPU_uxTaskGetStackHighWaterMark2
582    .type MPU_uxTaskGetStackHighWaterMark2, function
583    MPU_uxTaskGetStackHighWaterMark2:
584        INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxTaskGetStackHighWaterMark2, MPU_uxTaskGetStackHighWaterMark2Impl
585
586#endif /* if ( INCLUDE_uxTaskGetStackHighWaterMark2 == 1 ) */
587
588/* ------------------------------------------------------------------------------- */
589
590#if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) )
591
592    .extern MPU_xTaskGetCurrentTaskHandleImpl
593    .align 4
594    .global MPU_xTaskGetCurrentTaskHandle
595    .type MPU_xTaskGetCurrentTaskHandle, function
596    MPU_xTaskGetCurrentTaskHandle:
597        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskGetCurrentTaskHandle, MPU_xTaskGetCurrentTaskHandleImpl
598
599#endif /* if( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) ) */
600
601/* ------------------------------------------------------------------------------- */
602
603#if ( INCLUDE_xTaskGetSchedulerState == 1 )
604
605    .extern MPU_xTaskGetSchedulerStateImpl
606    .align 4
607    .global MPU_xTaskGetSchedulerState
608    .type MPU_xTaskGetSchedulerState, function
609    MPU_xTaskGetSchedulerState:
610        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskGetSchedulerState, MPU_xTaskGetSchedulerStateImpl
611
612
613#endif /* if ( INCLUDE_xTaskGetSchedulerState == 1 ) */
614
615/* ------------------------------------------------------------------------------- */
616
617#if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) )
618
619    .extern MPU_xQueueGetMutexHolderImpl
620    .align 4
621    .global MPU_xQueueGetMutexHolder
622    .type MPU_xQueueGetMutexHolder, function
623    MPU_xQueueGetMutexHolder:
624        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xQueueGetMutexHolder, MPU_xQueueGetMutexHolderImpl
625
626#endif /* if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) ) */
627
628/* ------------------------------------------------------------------------------- */
629
630#if ( configUSE_RECURSIVE_MUTEXES == 1 )
631
632    .extern MPU_xQueueTakeMutexRecursiveImpl
633    .align 4
634    .global MPU_xQueueTakeMutexRecursive
635    .type MPU_xQueueTakeMutexRecursive, function
636    MPU_xQueueTakeMutexRecursive:
637        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xQueueTakeMutexRecursive, MPU_xQueueTakeMutexRecursiveImpl
638
639    /* ------------------------------------------------------------------------------- */
640
641    .extern MPU_xQueueGiveMutexRecursiveImpl
642    .align 4
643    .global MPU_xQueueGiveMutexRecursive
644    .type MPU_xQueueGiveMutexRecursive, function
645    MPU_xQueueGiveMutexRecursive:
646        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xQueueGiveMutexRecursive, MPU_xQueueGiveMutexRecursiveImpl
647
648    /* ------------------------------------------------------------------------------- */
649
650#endif /* if ( configUSE_RECURSIVE_MUTEXES == 1 ) */
651
652/* ------------------------------------------------------------------------------- */
653
654#if ( configUSE_QUEUE_SETS == 1 )
655
656    .extern MPU_xQueueSelectFromSetImpl
657    .align 4
658    .global MPU_xQueueSelectFromSet
659    .type MPU_xQueueSelectFromSet, function
660    MPU_xQueueSelectFromSet:
661        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xQueueSelectFromSet, MPU_xQueueSelectFromSetImpl
662
663    /* ------------------------------------------------------------------------------- */
664
665    .extern MPU_xQueueAddToSetImpl
666    .align 4
667    .global MPU_xQueueAddToSet
668    .type MPU_xQueueAddToSet, function
669    MPU_xQueueAddToSet:
670        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xQueueAddToSet, MPU_xQueueAddToSetImpl
671
672    /* ------------------------------------------------------------------------------- */
673
674#endif /* if ( configUSE_QUEUE_SETS == 1 ) */
675
676/* ------------------------------------------------------------------------------- */
677
678#if ( configQUEUE_REGISTRY_SIZE > 0 )
679
680    .extern MPU_vQueueAddToRegistryImpl
681    .align 4
682    .global MPU_vQueueAddToRegistry
683    .type MPU_vQueueAddToRegistry, function
684    MPU_vQueueAddToRegistry:
685        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vQueueAddToRegistry, MPU_vQueueAddToRegistryImpl
686
687    /* ------------------------------------------------------------------------------- */
688
689    .extern MPU_vQueueUnregisterQueueImpl
690    .align 4
691    .global MPU_vQueueUnregisterQueue
692    .type MPU_vQueueUnregisterQueue, function
693    MPU_vQueueUnregisterQueue:
694        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vQueueUnregisterQueue, MPU_vQueueUnregisterQueueImpl
695
696    /* ------------------------------------------------------------------------------- */
697
698    .extern MPU_pcQueueGetNameImpl
699    .align 4
700    .global MPU_pcQueueGetName
701    .type MPU_pcQueueGetName, function
702    MPU_pcQueueGetName:
703        INVOKE_SYSTEM_CALL #SYSTEM_CALL_pcQueueGetName, MPU_pcQueueGetNameImpl
704
705    /* ------------------------------------------------------------------------------- */
706
707#endif /* if ( configQUEUE_REGISTRY_SIZE > 0 ) */
708
709/* ------------------------------------------------------------------------------- */
710
711#if ( configUSE_TIMERS == 1 )
712
713    .extern MPU_pvTimerGetTimerIDImpl
714    .align 4
715    .global MPU_pvTimerGetTimerID
716    .type MPU_pvTimerGetTimerID, function
717    MPU_pvTimerGetTimerID:
718        INVOKE_SYSTEM_CALL #SYSTEM_CALL_pvTimerGetTimerID, MPU_pvTimerGetTimerIDImpl
719
720    /* ------------------------------------------------------------------------------- */
721
722    .extern MPU_vTimerSetTimerIDImpl
723    .align 4
724    .global MPU_vTimerSetTimerID
725    .type MPU_vTimerSetTimerID, function
726    MPU_vTimerSetTimerID:
727        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vTimerSetTimerID, MPU_vTimerSetTimerIDImpl
728
729    /* ------------------------------------------------------------------------------- */
730
731    .extern MPU_xTimerIsTimerActiveImpl
732    .align 4
733    .global MPU_xTimerIsTimerActive
734    .type MPU_xTimerIsTimerActive, function
735    MPU_xTimerIsTimerActive:
736        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTimerIsTimerActive, MPU_xTimerIsTimerActiveImpl
737
738    /* ------------------------------------------------------------------------------- */
739
740    .extern MPU_xTimerGetTimerDaemonTaskHandleImpl
741    .align 4
742    .global MPU_xTimerGetTimerDaemonTaskHandle
743    .type MPU_xTimerGetTimerDaemonTaskHandle, function
744    MPU_xTimerGetTimerDaemonTaskHandle:
745        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTimerGetTimerDaemonTaskHandle, MPU_xTimerGetTimerDaemonTaskHandleImpl
746
747    /* ------------------------------------------------------------------------------- */
748
749    .extern MPU_xTimerGenericCommandFromTaskImpl
750    .align 4
751    .global MPU_xTimerGenericCommandFromTaskEntry
752    .type MPU_xTimerGenericCommandFromTaskEntry, function
753    MPU_xTimerGenericCommandFromTaskEntry:
754        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTimerGenericCommandFromTask, MPU_xTimerGenericCommandFromTaskImpl
755
756    /* ------------------------------------------------------------------------------- */
757
758    .extern MPU_pcTimerGetNameImpl
759    .align 4
760    .global MPU_pcTimerGetName
761    .type MPU_pcTimerGetName, function
762    MPU_pcTimerGetName:
763        INVOKE_SYSTEM_CALL #SYSTEM_CALL_pcTimerGetName, MPU_pcTimerGetNameImpl
764
765    /* ------------------------------------------------------------------------------- */
766
767    .extern MPU_vTimerSetReloadModeImpl
768    .align 4
769    .global MPU_vTimerSetReloadMode
770    .type MPU_vTimerSetReloadMode, function
771    MPU_vTimerSetReloadMode:
772        INVOKE_SYSTEM_CALL #SYSTEM_CALL_vTimerSetReloadMode, MPU_vTimerSetReloadModeImpl
773
774    /* ------------------------------------------------------------------------------- */
775
776    .extern MPU_xTimerGetReloadModeImpl
777    .align 4
778    .global MPU_xTimerGetReloadMode
779    .type MPU_xTimerGetReloadMode, function
780    MPU_xTimerGetReloadMode:
781        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTimerGetReloadMode, MPU_xTimerGetReloadModeImpl
782
783    /* ------------------------------------------------------------------------------- */
784
785    .extern MPU_uxTimerGetReloadModeImpl
786    .align 4
787    .global MPU_uxTimerGetReloadMode
788    .type MPU_uxTimerGetReloadMode, function
789    MPU_uxTimerGetReloadMode:
790        INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxTimerGetReloadMode, MPU_uxTimerGetReloadModeImpl
791
792    /* ------------------------------------------------------------------------------- */
793
794    .extern MPU_xTimerGetPeriodImpl
795    .align 4
796    .global MPU_xTimerGetPeriod
797    .type MPU_xTimerGetPeriod, function
798    MPU_xTimerGetPeriod:
799        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTimerGetPeriod, MPU_xTimerGetPeriodImpl
800
801    /* ------------------------------------------------------------------------------- */
802
803    .extern MPU_xTimerGetExpiryTimeImpl
804    .align 4
805    .global MPU_xTimerGetExpiryTime
806    .type MPU_xTimerGetExpiryTime, function
807    MPU_xTimerGetExpiryTime:
808        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTimerGetExpiryTime, MPU_xTimerGetExpiryTimeImpl
809
810    /* ------------------------------------------------------------------------------- */
811
812#endif /* if ( configUSE_TIMERS == 1 ) */
813
814/* ------------------------------------------------------------------------------- */
815
816#if ( configUSE_TASK_NOTIFICATIONS == 1 )
817
818    .extern MPU_xTaskGenericNotifyImpl
819    .align 4
820    .global MPU_xTaskGenericNotifyEntry
821    .type MPU_xTaskGenericNotifyEntry, function
822    MPU_xTaskGenericNotifyEntry:
823        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskGenericNotify, MPU_xTaskGenericNotifyImpl
824
825    /* ------------------------------------------------------------------------------- */
826
827    .extern MPU_xTaskGenericNotifyWaitImpl
828    .align 4
829    .global MPU_xTaskGenericNotifyWaitEntry
830    .type MPU_xTaskGenericNotifyWaitEntry, function
831    MPU_xTaskGenericNotifyWaitEntry:
832        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskGenericNotifyWait, MPU_xTaskGenericNotifyWaitImpl
833
834    /* ------------------------------------------------------------------------------- */
835
836    .extern MPU_ulTaskGenericNotifyTakeImpl
837    .align 4
838    .global MPU_ulTaskGenericNotifyTake
839    .type MPU_ulTaskGenericNotifyTake, function
840    MPU_ulTaskGenericNotifyTake:
841        INVOKE_SYSTEM_CALL #SYSTEM_CALL_ulTaskGenericNotifyTake, MPU_ulTaskGenericNotifyTakeImpl
842
843    /* ------------------------------------------------------------------------------- */
844
845    .extern MPU_xTaskGenericNotifyStateClearImpl
846    .align 4
847    .global MPU_xTaskGenericNotifyStateClear
848    .type MPU_xTaskGenericNotifyStateClear, function
849    MPU_xTaskGenericNotifyStateClear:
850        INVOKE_SYSTEM_CALL #SYSTEM_CALL_xTaskGenericNotifyStateClear, MPU_xTaskGenericNotifyStateClearImpl
851
852    /* ------------------------------------------------------------------------------- */
853
854    .extern MPU_ulTaskGenericNotifyValueClearImpl
855    .align 4
856    .global MPU_ulTaskGenericNotifyValueClear
857    .type MPU_ulTaskGenericNotifyValueClear, function
858    MPU_ulTaskGenericNotifyValueClear:
859        INVOKE_SYSTEM_CALL #SYSTEM_CALL_ulTaskGenericNotifyValueClear, MPU_ulTaskGenericNotifyValueClearImpl
860
861    /* ------------------------------------------------------------------------------- */
862
863#endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */
864
865/* ------------------------------------------------------------------------------- */
866
867.end
868