File tree Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,28 @@ static void prvTaskExitError( void )
221221}
222222/*-----------------------------------------------------------*/
223223
224+ __attribute__((always_inline )) static BaseType_t xPortIsInsideInterrupt ( void )
225+ {
226+ uint32_t ulCurrentInterrupt ;
227+ BaseType_t xReturn ;
228+
229+ /* Obtain the number of the currently executing interrupt. */
230+ __asm volatile ("mfc0 %0, $12" : "=r" (ulCurrentInterrupt ));
231+
232+ if ( ulCurrentInterrupt == 0 )
233+ {
234+ xReturn = pdFALSE ;
235+ }
236+ else
237+ {
238+ xReturn = pdTRUE ;
239+ }
240+
241+ return xReturn ;
242+ }
243+
244+ /*-----------------------------------------------------------*/
245+
224246/*
225247 * Setup a timer for a regular tick. This function uses peripheral timer 1.
226248 * The function is declared weak so an application writer can use a different
@@ -372,25 +394,3 @@ void vPortClearInterruptMaskFromISR( UBaseType_t uxSavedStatusRegister )
372394#endif /* __mips_hard_float == 1 */
373395
374396/*-----------------------------------------------------------*/
375-
376- __attribute__((always_inline )) static BaseType_t xPortIsInsideInterrupt ( void )
377- {
378- uint32_t ulCurrentInterrupt ;
379- BaseType_t xReturn ;
380-
381- /* Obtain the number of the currently executing interrupt. */
382- __asm volatile ("mfc0 %0, $12" : "=r" (ulCurrentInterrupt ));
383-
384- if ( ulCurrentInterrupt == 0 )
385- {
386- xReturn = pdFALSE ;
387- }
388- else
389- {
390- xReturn = pdTRUE ;
391- }
392-
393- return xReturn ;
394- }
395-
396- /*-----------------------------------------------------------*/
You can’t perform that action at this time.
0 commit comments