mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 13:31:58 -04:00
Replace the function that returns the current run time counter value with a macro for easier inlining.
This commit is contained in:
parent
25bc4acc6a
commit
12949b4507
|
@ -117,12 +117,38 @@ case configTICK__VECTOR is set to TIMER0_A0_VECTOR. */
|
|||
is included from an asm file. */
|
||||
#ifdef __ICC430__
|
||||
extern void vConfigureTimerForRunTimeStats( void );
|
||||
extern inline unsigned long ulGetRunTimeStatsTime( void );
|
||||
extern volatile unsigned long ulStatsOverflowCount;
|
||||
#endif /* __ICCARM__ */
|
||||
|
||||
/* Configure a 16 bit timer to generate the time base for the run time stats.
|
||||
The timer is configured to interrupt each time it overflows so a count of
|
||||
overflows can be kept - that way a 32 bit time value can be constructed from
|
||||
the timers current count value and the number of overflows. */
|
||||
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()
|
||||
#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeStatsTime()
|
||||
|
||||
/* Construct a 32 bit time value for use as the run time stats time base. This
|
||||
comes from the current value of a 16 bit timer combined with the number of times
|
||||
the timer has overflowed. */
|
||||
#define portALT_GET_RUN_TIME_COUNTER_VALUE( ulCountValue ) \
|
||||
{ \
|
||||
/* Stop the counter counting temporarily. */ \
|
||||
TA1CTL &= ~MC__CONTINOUS; \
|
||||
\
|
||||
/* Check to see if any counter overflow interrupts are pending. */ \
|
||||
if( ( TA1CTL & TAIFG ) != 0 ) \
|
||||
{ \
|
||||
/* An overflow has occurred but not yet been processed. */ \
|
||||
ulStatsOverflowCount++; \
|
||||
\
|
||||
/* Clear the interrupt. */ \
|
||||
TA1CTL &= ~TAIFG; \
|
||||
} \
|
||||
\
|
||||
/* Generate a 32 bit counter value by combinging the current peripheral \
|
||||
counter value with the number of overflows. */ \
|
||||
ulCountValue = ( ulStatsOverflowCount << 16UL ); \
|
||||
ulCountValue |= ( unsigned long ) TA1R; \
|
||||
TA1CTL |= MC__CONTINOUS; \
|
||||
}
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
|
||||
|
|
|
@ -102,29 +102,3 @@ static __interrupt void prvRunTimeStatsOverflowISR( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
inline unsigned long ulGetRunTimeStatsTime( void )
|
||||
{
|
||||
unsigned long ulReturn;
|
||||
|
||||
TA1CTL &= ~MC__CONTINOUS;
|
||||
|
||||
if( ( TA1CTL & TAIFG ) != 0 )
|
||||
{
|
||||
/* An overflow has occurred but not yet been processed. */
|
||||
ulStatsOverflowCount++;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
TA1CTL &= ~TAIFG;
|
||||
}
|
||||
else
|
||||
{
|
||||
__no_operation();
|
||||
}
|
||||
|
||||
ulReturn = ( ulStatsOverflowCount << 16UL );
|
||||
ulReturn |= ( unsigned long ) TA1R;
|
||||
TA1CTL |= MC__CONTINOUS;
|
||||
|
||||
return ulReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
|
||||
<Column0>117</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
<Column0>185</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Disassembly>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
|
||||
|
||||
<Wnd0>
|
||||
<Wnd4>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-11539-27703</Identity>
|
||||
|
@ -43,20 +43,20 @@
|
|||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-25774-15685</Identity><TabName>Terminal I/O</TabName><Factory>TerminalIO</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1><Wnd2><Tabs><Tab><Identity>TabID-22323-19482</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd2></Windows>
|
||||
<SelectedTab>0</SelectedTab></Wnd4><Wnd5><Tabs><Tab><Identity>TabID-25774-15685</Identity><TabName>Terminal I/O</TabName><Factory>TerminalIO</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd5><Wnd6><Tabs><Tab><Identity>TabID-22323-19482</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd6></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>230</YPos><SelStart>12197</SelStart><SelEnd>12197</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\MSP430X\port.c</Filename><XPos>0</XPos><YPos>179</YPos><SelStart>8031</SelStart><SelEnd>8031</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>1592</YPos><SelStart>50606</SelStart><SelEnd>50606</SelEnd></Tab><ActiveTab>2</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>230</YPos><SelStart>12197</SelStart><SelEnd>12197</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>6468</SelStart><SelEnd>6468</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\RunTimeStatsConfig.c</Filename><XPos>0</XPos><YPos>76</YPos><SelStart>4634</SelStart><SelEnd>4634</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>1583</YPos><SelStart>50154</SelStart><SelEnd>50154</SelEnd></Tab><ActiveTab>3</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\include\FreeRTOS.h</Filename><XPos>0</XPos><YPos>372</YPos><SelStart>12619</SelStart><SelEnd>12619</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-012aad60><key>iaridepm.enu1</key></Toolbar-012aad60><Toolbar-0695e588><key>430fet1</key></Toolbar-0695e588></Sizes></Row0><Row1><Sizes><Toolbar-0133c848><key>debuggergui.enu1</key></Toolbar-0133c848></Sizes></Row1><Row2><Sizes/></Row2></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>716</Bottom><Right>191</Right><x>-2</x><y>-2</y><xscreen>121</xscreen><yscreen>150</yscreen><sizeHorzCX>72024</sizeHorzCX><sizeHorzCY>152749</sizeHorzCY><sizeVertCX>114881</sizeVertCX><sizeVertCY>731161</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>716</Bottom><Right>497</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>297024</sizeVertCX><sizeVertCY>731161</sizeVertCY></Rect></Wnd1></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-012aad60><key>iaridepm.enu1</key></Toolbar-012aad60><Toolbar-01349758><key>430fet1</key></Toolbar-01349758></Sizes></Row0><Row1><Sizes><Toolbar-06875788><key>debuggergui.enu1</key></Toolbar-06875788></Sizes></Row1></Top><Left><Row0><Sizes><Wnd4><Rect><Top>-2</Top><Left>-2</Left><Bottom>716</Bottom><Right>259</Right><x>-2</x><y>-2</y><xscreen>121</xscreen><yscreen>150</yscreen><sizeHorzCX>72024</sizeHorzCX><sizeHorzCY>152749</sizeHorzCY><sizeVertCX>155357</sizeVertCX><sizeVertCY>731161</sizeVertCY></Rect></Wnd4></Sizes></Row0></Left><Right><Row0><Sizes><Wnd5><Rect><Top>-2</Top><Left>-2</Left><Bottom>716</Bottom><Right>439</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>262500</sizeVertCX><sizeVertCY>731161</sizeVertCY></Rect></Wnd5></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd6><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd6></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[DebugChecksum]
|
||||
Checksum=-1480900162
|
||||
Checksum=143335623
|
||||
[DisAssemblyWindow]
|
||||
NumStates=_ 1
|
||||
State 1=_ 1
|
||||
|
@ -14,7 +14,7 @@ Control Register=0
|
|||
NextState0=0
|
||||
NextState1=0
|
||||
[Action Register]
|
||||
Break=1
|
||||
Break=2
|
||||
State Storage=0
|
||||
[Profiling]
|
||||
Enabled=0
|
||||
|
@ -39,7 +39,7 @@ LogFile=_ ""
|
|||
Enabled=0
|
||||
[DriverProfiling]
|
||||
Enabled=0
|
||||
Mode=604119078
|
||||
Mode=-1827890818
|
||||
Graph=0
|
||||
Symbiont=0
|
||||
[Breakpoints]
|
||||
|
|
|
@ -43,14 +43,14 @@
|
|||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>230</YPos><SelStart>12197</SelStart><SelEnd>12197</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>230</YPos><SelStart>12197</SelStart><SelEnd>12197</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>6468</SelStart><SelEnd>6468</SelEnd></Tab><ActiveTab>1</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\RunTimeStatsConfig.c</Filename><XPos>0</XPos><YPos>76</YPos><SelStart>4634</SelStart><SelEnd>4634</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>1583</YPos><SelStart>50154</SelStart><SelEnd>50154</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\include\FreeRTOS.h</Filename><XPos>0</XPos><YPos>372</YPos><SelStart>12619</SelStart><SelEnd>12619</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-012aad60><key>iaridepm.enu1</key></Toolbar-012aad60></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>309</Right><x>-2</x><y>-2</y><xscreen>331</xscreen><yscreen>267</yscreen><sizeHorzCX>197024</sizeHorzCX><sizeHorzCY>271894</sizeHorzCY><sizeVertCX>185119</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-012aad60><key>iaridepm.enu1</key></Toolbar-012aad60></Sizes></Row0><Row1><Sizes/></Row1><Row2><Sizes/></Row2><Row3><Sizes/></Row3><Row4><Sizes/></Row4><Row5><Sizes/></Row5><Row6><Sizes/></Row6></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>309</Right><x>-2</x><y>-2</y><xscreen>331</xscreen><yscreen>267</yscreen><sizeHorzCX>197024</sizeHorzCX><sizeHorzCY>271894</sizeHorzCY><sizeVertCX>185119</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
|
Loading…
Reference in a new issue