timers.c.070i.icf 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649
  1. Parsed function:prvInsertTimerInActiveList.part.0
  2. Parsed function:vTimerSetTimerNumber
  3. Parsed function:uxTimerGetTimerNumber
  4. Parsed function:xTimerPendFunctionCall
  5. Parsed function:xTimerPendFunctionCallFromISR
  6. Parsed function:vTimerSetTimerID
  7. Parsed function:pvTimerGetTimerID
  8. Parsed function:xTimerIsTimerActive
  9. Parsed function:prvCheckForValidListAndQueue
  10. Parsed function:prvSwitchTimerLists
  11. Parsed function:prvProcessReceivedCommands
  12. Parsed function:prvInsertTimerInActiveList
  13. Parsed function:prvSampleTimeNow
  14. Parsed function:prvGetNextExpireTime
  15. Parsed function:prvProcessTimerOrBlockTask
  16. Parsed function:prvTimerTask
  17. Parsed function:prvProcessExpiredTimer
  18. Parsed function:prvReloadTimer
  19. Parsed function:pcTimerGetName
  20. Parsed function:xTimerGetExpiryTime
  21. Parsed function:uxTimerGetReloadMode
  22. Parsed function:vTimerSetReloadMode
  23. Parsed function:xTimerGetPeriod
  24. Parsed function:xTimerGetTimerDaemonTaskHandle
  25. Parsed function:xTimerGenericCommand
  26. Parsed function:prvInitialiseNewTimer
  27. Parsed function:xTimerCreate
  28. Parsed function:xTimerCreateTimerTask
  29. Dump after hash based groups
  30. Congruence classes: 27 (unique hash values: 27), with total: 28 items
  31. Class size histogram [num of members]: number of classe number of classess
  32. [1]: 26 classes
  33. [2]: 1 classes
  34. Dump after WPA based types groups
  35. Congruence classes: 27 (unique hash values: 27), with total: 28 items
  36. Class size histogram [num of members]: number of classe number of classess
  37. [1]: 26 classes
  38. [2]: 1 classes
  39. Worklist has been filled with: 12
  40. Address reference subdivision created: 0 new classes.
  41. Dump after callgraph-based congruence reduction
  42. Congruence classes: 27 (unique hash values: 27), with total: 28 items
  43. Class size histogram [num of members]: number of classe number of classess
  44. [1]: 26 classes
  45. [2]: 1 classes
  46. Init called for 2 items (7.14%).
  47. Dump after full equality comparison of groups
  48. Congruence classes: 28 (unique hash values: 27), with total: 28 items
  49. Class size histogram [num of members]: number of classe number of classess
  50. [1]: 28 classes
  51. Worklist has been filled with: 12
  52. Address reference subdivision created: 0 new classes.
  53. Congruence classes: 28 (unique hash values: 27), with total: 28 items
  54. Class size histogram [num of members]: number of classe number of classess
  55. [1]: 28 classes
  56. Item count: 28
  57. Congruent classes before: 28, after: 28
  58. Average class size before: 1.00, after: 1.00
  59. Average non-singular class size: 0.00, count: 0
  60. Equal symbols: 0
  61. Fraction of visited symbols: 0.00%
  62. prvInsertTimerInActiveList.part.0 (struct Timer_t * const pxTimer)
  63. {
  64. BaseType_t xProcessTimerNow;
  65. const TickType_t xNextExpiryTime;
  66. const TickType_t xTimeNow;
  67. const TickType_t xCommandTime;
  68. struct List_t * pxOverflowTimerList.14_1;
  69. struct ListItem_t * _3;
  70. <bb 4> [local count: 1073741824]:
  71. # DEBUG D#6 s=> xNextExpiryTime
  72. # DEBUG xNextExpiryTime => D#6
  73. # DEBUG D#5 s=> xTimeNow
  74. # DEBUG xTimeNow => D#5
  75. # DEBUG D#4 s=> xCommandTime
  76. # DEBUG xCommandTime => D#4
  77. <bb 2> [local count: 1073741824]:
  78. # DEBUG BEGIN_STMT
  79. pxOverflowTimerList.14_1 = pxOverflowTimerList;
  80. _3 = &pxTimer_2(D)->xTimerListItem;
  81. vListInsert (pxOverflowTimerList.14_1, _3);
  82. <bb 3> [local count: 1073741824]:
  83. # xProcessTimerNow_4 = PHI <0(2)>
  84. # DEBUG xProcessTimerNow => xProcessTimerNow_4
  85. # DEBUG BEGIN_STMT
  86. return xProcessTimerNow_4;
  87. }
  88. vTimerSetTimerNumber (struct tmrTimerControl * xTimer, UBaseType_t uxTimerNumber)
  89. {
  90. <bb 2> [local count: 1073741824]:
  91. # DEBUG BEGIN_STMT
  92. MEM[(struct Timer_t *)xTimer_2(D)].uxTimerNumber = uxTimerNumber_3(D);
  93. return;
  94. }
  95. uxTimerGetTimerNumber (struct tmrTimerControl * xTimer)
  96. {
  97. UBaseType_t _3;
  98. <bb 2> [local count: 1073741824]:
  99. # DEBUG BEGIN_STMT
  100. _3 = MEM[(struct Timer_t *)xTimer_2(D)].uxTimerNumber;
  101. return _3;
  102. }
  103. xTimerPendFunctionCall (void (*PendedFunction_t) (void *, uint32_t) xFunctionToPend, void * pvParameter1, uint32_t ulParameter2, TickType_t xTicksToWait)
  104. {
  105. uint32_t ulNewBASEPRI;
  106. BaseType_t xReturn;
  107. struct DaemonTaskMessage_t xMessage;
  108. struct QueueDefinition * xTimerQueue.26_1;
  109. <bb 2> [local count: 230763]:
  110. # DEBUG BEGIN_STMT
  111. # DEBUG BEGIN_STMT
  112. # DEBUG BEGIN_STMT
  113. xTimerQueue.26_1 = xTimerQueue;
  114. if (xTimerQueue.26_1 == 0B)
  115. goto <bb 3>; [46.53%]
  116. else
  117. goto <bb 5>; [53.47%]
  118. <bb 3> [local count: 107374]:
  119. # DEBUG BEGIN_STMT
  120. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  121. # DEBUG BEGIN_STMT
  122. # DEBUG BEGIN_STMT
  123. __asm__ __volatile__(" mov %0, %1
  124. msr basepri, %0
  125. isb
  126. dsb
  127. " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory");
  128. # DEBUG ulNewBASEPRI => ulNewBASEPRI_14
  129. <bb 4> [local count: 1073741824]:
  130. # DEBUG ulNewBASEPRI => NULL
  131. # DEBUG BEGIN_STMT
  132. # DEBUG BEGIN_STMT
  133. # DEBUG BEGIN_STMT
  134. <bb 6> [local count: 1073741824]:
  135. goto <bb 4>; [100.00%]
  136. <bb 5> [local count: 123389]:
  137. # DEBUG BEGIN_STMT
  138. # DEBUG BEGIN_STMT
  139. xMessage.xMessageID = -1;
  140. # DEBUG BEGIN_STMT
  141. xMessage.u.xCallbackParameters.pxCallbackFunction = xFunctionToPend_4(D);
  142. # DEBUG BEGIN_STMT
  143. xMessage.u.xCallbackParameters.pvParameter1 = pvParameter1_6(D);
  144. # DEBUG BEGIN_STMT
  145. xMessage.u.xCallbackParameters.ulParameter2 = ulParameter2_8(D);
  146. # DEBUG BEGIN_STMT
  147. xReturn_12 = xQueueGenericSend (xTimerQueue.26_1, &xMessage, xTicksToWait_10(D), 0);
  148. # DEBUG xReturn => xReturn_12
  149. # DEBUG BEGIN_STMT
  150. # DEBUG BEGIN_STMT
  151. xMessage ={v} {CLOBBER};
  152. return xReturn_12;
  153. }
  154. xTimerPendFunctionCallFromISR (void (*PendedFunction_t) (void *, uint32_t) xFunctionToPend, void * pvParameter1, uint32_t ulParameter2, BaseType_t * pxHigherPriorityTaskWoken)
  155. {
  156. BaseType_t xReturn;
  157. struct DaemonTaskMessage_t xMessage;
  158. struct QueueDefinition * xTimerQueue.25_1;
  159. <bb 2> [local count: 1073741824]:
  160. # DEBUG BEGIN_STMT
  161. # DEBUG BEGIN_STMT
  162. # DEBUG BEGIN_STMT
  163. xMessage.xMessageID = -2;
  164. # DEBUG BEGIN_STMT
  165. xMessage.u.xCallbackParameters.pxCallbackFunction = xFunctionToPend_4(D);
  166. # DEBUG BEGIN_STMT
  167. xMessage.u.xCallbackParameters.pvParameter1 = pvParameter1_6(D);
  168. # DEBUG BEGIN_STMT
  169. xMessage.u.xCallbackParameters.ulParameter2 = ulParameter2_8(D);
  170. # DEBUG BEGIN_STMT
  171. xTimerQueue.25_1 = xTimerQueue;
  172. xReturn_12 = xQueueGenericSendFromISR (xTimerQueue.25_1, &xMessage, pxHigherPriorityTaskWoken_10(D), 0);
  173. # DEBUG xReturn => xReturn_12
  174. # DEBUG BEGIN_STMT
  175. # DEBUG BEGIN_STMT
  176. xMessage ={v} {CLOBBER};
  177. return xReturn_12;
  178. }
  179. vTimerSetTimerID (struct tmrTimerControl * xTimer, void * pvNewID)
  180. {
  181. uint32_t ulNewBASEPRI;
  182. <bb 2> [local count: 230763]:
  183. # DEBUG BEGIN_STMT
  184. # DEBUG pxTimer => xTimer_1(D)
  185. # DEBUG BEGIN_STMT
  186. if (xTimer_1(D) == 0B)
  187. goto <bb 3>; [46.53%]
  188. else
  189. goto <bb 5>; [53.47%]
  190. <bb 3> [local count: 107374]:
  191. # DEBUG BEGIN_STMT
  192. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  193. # DEBUG BEGIN_STMT
  194. # DEBUG BEGIN_STMT
  195. __asm__ __volatile__(" mov %0, %1
  196. msr basepri, %0
  197. isb
  198. dsb
  199. " : "=r" ulNewBASEPRI_7 : "i" 16 : "memory");
  200. # DEBUG ulNewBASEPRI => ulNewBASEPRI_7
  201. <bb 4> [local count: 1073741824]:
  202. # DEBUG ulNewBASEPRI => NULL
  203. # DEBUG BEGIN_STMT
  204. # DEBUG BEGIN_STMT
  205. # DEBUG BEGIN_STMT
  206. <bb 6> [local count: 1073741824]:
  207. goto <bb 4>; [100.00%]
  208. <bb 5> [local count: 123389]:
  209. # DEBUG BEGIN_STMT
  210. # DEBUG BEGIN_STMT
  211. vPortEnterCritical ();
  212. # DEBUG BEGIN_STMT
  213. MEM[(struct Timer_t *)xTimer_1(D)].pvTimerID = pvNewID_4(D);
  214. # DEBUG BEGIN_STMT
  215. vPortExitCritical ();
  216. return;
  217. }
  218. pvTimerGetTimerID (struct tmrTimerControl * const xTimer)
  219. {
  220. uint32_t ulNewBASEPRI;
  221. void * pvReturn;
  222. <bb 2> [local count: 230763]:
  223. # DEBUG BEGIN_STMT
  224. # DEBUG pxTimer => xTimer_1(D)
  225. # DEBUG BEGIN_STMT
  226. # DEBUG BEGIN_STMT
  227. if (xTimer_1(D) == 0B)
  228. goto <bb 3>; [46.53%]
  229. else
  230. goto <bb 5>; [53.47%]
  231. <bb 3> [local count: 107374]:
  232. # DEBUG BEGIN_STMT
  233. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  234. # DEBUG BEGIN_STMT
  235. # DEBUG BEGIN_STMT
  236. __asm__ __volatile__(" mov %0, %1
  237. msr basepri, %0
  238. isb
  239. dsb
  240. " : "=r" ulNewBASEPRI_6 : "i" 16 : "memory");
  241. # DEBUG ulNewBASEPRI => ulNewBASEPRI_6
  242. <bb 4> [local count: 1073741824]:
  243. # DEBUG ulNewBASEPRI => NULL
  244. # DEBUG BEGIN_STMT
  245. # DEBUG BEGIN_STMT
  246. # DEBUG BEGIN_STMT
  247. <bb 6> [local count: 1073741824]:
  248. goto <bb 4>; [100.00%]
  249. <bb 5> [local count: 123389]:
  250. # DEBUG BEGIN_STMT
  251. # DEBUG BEGIN_STMT
  252. vPortEnterCritical ();
  253. # DEBUG BEGIN_STMT
  254. pvReturn_4 = MEM[(struct Timer_t *)xTimer_1(D)].pvTimerID;
  255. # DEBUG pvReturn => pvReturn_4
  256. # DEBUG BEGIN_STMT
  257. vPortExitCritical ();
  258. # DEBUG BEGIN_STMT
  259. return pvReturn_4;
  260. }
  261. xTimerIsTimerActive (struct tmrTimerControl * xTimer)
  262. {
  263. uint32_t ulNewBASEPRI;
  264. unsigned char _1;
  265. long int _2;
  266. unsigned char _4;
  267. <bb 2> [local count: 230763]:
  268. # DEBUG BEGIN_STMT
  269. # DEBUG BEGIN_STMT
  270. # DEBUG pxTimer => xTimer_3(D)
  271. # DEBUG BEGIN_STMT
  272. if (xTimer_3(D) == 0B)
  273. goto <bb 3>; [46.53%]
  274. else
  275. goto <bb 5>; [53.47%]
  276. <bb 3> [local count: 107374]:
  277. # DEBUG BEGIN_STMT
  278. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  279. # DEBUG BEGIN_STMT
  280. # DEBUG BEGIN_STMT
  281. __asm__ __volatile__(" mov %0, %1
  282. msr basepri, %0
  283. isb
  284. dsb
  285. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  286. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  287. <bb 4> [local count: 1073741824]:
  288. # DEBUG ulNewBASEPRI => NULL
  289. # DEBUG BEGIN_STMT
  290. # DEBUG BEGIN_STMT
  291. # DEBUG BEGIN_STMT
  292. <bb 6> [local count: 1073741824]:
  293. goto <bb 4>; [100.00%]
  294. <bb 5> [local count: 123389]:
  295. # DEBUG BEGIN_STMT
  296. # DEBUG BEGIN_STMT
  297. vPortEnterCritical ();
  298. # DEBUG BEGIN_STMT
  299. _1 = MEM[(struct Timer_t *)xTimer_3(D)].ucStatus;
  300. _4 = _1 & 1;
  301. _2 = (long int) _4;
  302. # DEBUG xReturn => _2
  303. # DEBUG BEGIN_STMT
  304. vPortExitCritical ();
  305. # DEBUG BEGIN_STMT
  306. return _2;
  307. }
  308. prvCheckForValidListAndQueue ()
  309. {
  310. struct QueueDefinition * xTimerQueue.17_1;
  311. struct QueueDefinition * _2;
  312. <bb 2> [local count: 1073741824]:
  313. # DEBUG BEGIN_STMT
  314. vPortEnterCritical ();
  315. # DEBUG BEGIN_STMT
  316. xTimerQueue.17_1 = xTimerQueue;
  317. if (xTimerQueue.17_1 == 0B)
  318. goto <bb 3>; [17.43%]
  319. else
  320. goto <bb 5>; [82.57%]
  321. <bb 3> [local count: 187153200]:
  322. # DEBUG BEGIN_STMT
  323. vListInitialise (&xActiveTimerList1);
  324. # DEBUG BEGIN_STMT
  325. vListInitialise (&xActiveTimerList2);
  326. # DEBUG BEGIN_STMT
  327. pxCurrentTimerList = &xActiveTimerList1;
  328. # DEBUG BEGIN_STMT
  329. pxOverflowTimerList = &xActiveTimerList2;
  330. # DEBUG BEGIN_STMT
  331. _2 = xQueueGenericCreate (10, 16, 0);
  332. xTimerQueue = _2;
  333. # DEBUG BEGIN_STMT
  334. if (_2 != 0B)
  335. goto <bb 4>; [53.47%]
  336. else
  337. goto <bb 5>; [46.53%]
  338. <bb 4> [local count: 100070816]:
  339. # DEBUG BEGIN_STMT
  340. vQueueAddToRegistry (_2, "TmrQ");
  341. <bb 5> [local count: 1073741824]:
  342. # DEBUG BEGIN_STMT
  343. # DEBUG BEGIN_STMT
  344. vPortExitCritical ();
  345. return;
  346. }
  347. prvSwitchTimerLists ()
  348. {
  349. TickType_t xNextExpireTime;
  350. struct xLIST_ITEM * _1;
  351. struct List_t * pxCurrentTimerList.11_2;
  352. long unsigned int _3;
  353. struct List_t * pxOverflowTimerList.12_4;
  354. struct List_t * pxCurrentTimerList.11_7;
  355. <bb 2> [local count: 118111600]:
  356. # DEBUG BEGIN_STMT
  357. # DEBUG BEGIN_STMT
  358. # DEBUG BEGIN_STMT
  359. goto <bb 4>; [100.00%]
  360. <bb 3> [local count: 955630223]:
  361. # DEBUG BEGIN_STMT
  362. _1 = pxCurrentTimerList.11_2->xListEnd.pxNext;
  363. xNextExpireTime_10 = _1->xItemValue;
  364. # DEBUG xNextExpireTime => xNextExpireTime_10
  365. # DEBUG BEGIN_STMT
  366. prvProcessExpiredTimer (xNextExpireTime_10, 4294967295);
  367. <bb 4> [local count: 1073741824]:
  368. # DEBUG BEGIN_STMT
  369. pxCurrentTimerList.11_2 = pxCurrentTimerList;
  370. _3 ={v} pxCurrentTimerList.11_2->uxNumberOfItems;
  371. if (_3 != 0)
  372. goto <bb 3>; [89.00%]
  373. else
  374. goto <bb 5>; [11.00%]
  375. <bb 5> [local count: 118111601]:
  376. # pxCurrentTimerList.11_7 = PHI <pxCurrentTimerList.11_2(4)>
  377. # DEBUG BEGIN_STMT
  378. # DEBUG pxTemp => pxCurrentTimerList.11_7
  379. # DEBUG BEGIN_STMT
  380. pxOverflowTimerList.12_4 = pxOverflowTimerList;
  381. pxCurrentTimerList = pxOverflowTimerList.12_4;
  382. # DEBUG BEGIN_STMT
  383. pxOverflowTimerList = pxCurrentTimerList.11_7;
  384. return;
  385. }
  386. prvProcessReceivedCommands ()
  387. {
  388. uint32_t ulNewBASEPRI;
  389. TickType_t xTimeNow;
  390. BaseType_t xTimerListsWereSwitched;
  391. struct Timer_t * pxTimer;
  392. struct DaemonTaskMessage_t xMessage;
  393. long int _1;
  394. void (*<T68e>) (void *, uint32_t) _2;
  395. void * _3;
  396. long unsigned int _4;
  397. long int _5;
  398. struct xLIST * _6;
  399. struct ListItem_t * _7;
  400. long int _8;
  401. unsigned char _9;
  402. unsigned char _10;
  403. long unsigned int _11;
  404. long unsigned int _12;
  405. long unsigned int _13;
  406. long int _15;
  407. unsigned char _16;
  408. long unsigned int _17;
  409. long unsigned int _18;
  410. long unsigned int _19;
  411. unsigned char _21;
  412. void (*<T689>) (struct tmrTimerControl *) _22;
  413. unsigned char _23;
  414. unsigned char _24;
  415. unsigned char _25;
  416. unsigned char _26;
  417. long unsigned int _27;
  418. long unsigned int _30;
  419. unsigned char _31;
  420. unsigned char _33;
  421. struct QueueDefinition * xTimerQueue.16_34;
  422. long int _35;
  423. unsigned char _63;
  424. unsigned char _65;
  425. <bb 2> [local count: 10436763]:
  426. # DEBUG BEGIN_STMT
  427. # DEBUG BEGIN_STMT
  428. # DEBUG BEGIN_STMT
  429. # DEBUG BEGIN_STMT
  430. # DEBUG BEGIN_STMT
  431. goto <bb 23>; [100.00%]
  432. <bb 3> [local count: 177477686]:
  433. # DEBUG BEGIN_STMT
  434. _1 = xMessage.xMessageID;
  435. if (_1 < 0)
  436. goto <bb 4>; [41.00%]
  437. else
  438. goto <bb 5>; [59.00%]
  439. <bb 4> [local count: 72765851]:
  440. # DEBUG BEGIN_STMT
  441. # DEBUG pxCallback => &xMessage.u.xCallbackParameters
  442. # DEBUG BEGIN_STMT
  443. # DEBUG BEGIN_STMT
  444. # DEBUG BEGIN_STMT
  445. _2 = MEM[(const struct CallbackParameters_t *)&xMessage + 4B].pxCallbackFunction;
  446. _3 = MEM[(const struct CallbackParameters_t *)&xMessage + 4B].pvParameter1;
  447. _4 = MEM[(const struct CallbackParameters_t *)&xMessage + 4B].ulParameter2;
  448. _2 (_3, _4);
  449. <bb 5> [local count: 177477686]:
  450. # DEBUG BEGIN_STMT
  451. # DEBUG BEGIN_STMT
  452. _5 = xMessage.xMessageID;
  453. if (_5 >= 0)
  454. goto <bb 6>; [5.50%]
  455. else
  456. goto <bb 29>; [94.50%]
  457. <bb 29> [local count: 167716413]:
  458. goto <bb 25>; [100.00%]
  459. <bb 6> [local count: 9761273]:
  460. # DEBUG BEGIN_STMT
  461. pxTimer_47 = xMessage.u.xTimerParameters.pxTimer;
  462. # DEBUG pxTimer => pxTimer_47
  463. # DEBUG BEGIN_STMT
  464. _6 = pxTimer_47->xTimerListItem.pvContainer;
  465. if (_6 != 0B)
  466. goto <bb 7>; [53.47%]
  467. else
  468. goto <bb 8>; [46.53%]
  469. <bb 7> [local count: 5219353]:
  470. # DEBUG BEGIN_STMT
  471. _7 = &pxTimer_47->xTimerListItem;
  472. uxListRemove (_7);
  473. <bb 8> [local count: 9761273]:
  474. # DEBUG BEGIN_STMT
  475. # DEBUG BEGIN_STMT
  476. # DEBUG BEGIN_STMT
  477. xTimeNow_50 = prvSampleTimeNow (&xTimerListsWereSwitched);
  478. # DEBUG xTimeNow => xTimeNow_50
  479. # DEBUG BEGIN_STMT
  480. _8 = xMessage.xMessageID;
  481. switch (_8) <default: <L41> [20.00%], case 1 ... 2: <L11> [20.00%], case 3: <L21> [20.00%], case 4: <L23> [20.00%], case 5: <L28> [20.00%], case 6 ... 7: <L11> [20.00%], case 8: <L21> [20.00%], case 9: <L23> [20.00%]>
  482. <bb 28> [local count: 1952255]:
  483. <L41>:
  484. goto <bb 24>; [100.00%]
  485. <bb 9> [local count: 1952255]:
  486. # pxTimer_14 = PHI <pxTimer_47(8)>
  487. # xTimeNow_46 = PHI <xTimeNow_50(8)>
  488. <L11>:
  489. # DEBUG BEGIN_STMT
  490. _9 = pxTimer_14->ucStatus;
  491. _10 = _9 | 1;
  492. pxTimer_14->ucStatus = _10;
  493. # DEBUG BEGIN_STMT
  494. _11 = xMessage.u.xTimerParameters.xMessageValue;
  495. _12 = pxTimer_14->xTimerPeriodInTicks;
  496. _13 = _11 + _12;
  497. _15 = prvInsertTimerInActiveList (pxTimer_14, _13, xTimeNow_46, _11);
  498. if (_15 != 0)
  499. goto <bb 10>; [50.00%]
  500. else
  501. goto <bb 22>; [50.00%]
  502. <bb 10> [local count: 976127]:
  503. # DEBUG BEGIN_STMT
  504. _16 = pxTimer_14->ucStatus;
  505. _65 = _16 & 4;
  506. if (_65 != 0)
  507. goto <bb 11>; [33.00%]
  508. else
  509. goto <bb 12>; [67.00%]
  510. <bb 11> [local count: 322122]:
  511. # DEBUG BEGIN_STMT
  512. _17 = xMessage.u.xTimerParameters.xMessageValue;
  513. _18 = pxTimer_14->xTimerPeriodInTicks;
  514. _19 = _17 + _18;
  515. prvReloadTimer (pxTimer_14, _19, xTimeNow_46);
  516. goto <bb 13>; [100.00%]
  517. <bb 12> [local count: 654005]:
  518. # DEBUG BEGIN_STMT
  519. _21 = _16 & 254;
  520. pxTimer_14->ucStatus = _21;
  521. <bb 13> [local count: 976127]:
  522. # DEBUG BEGIN_STMT
  523. # DEBUG BEGIN_STMT
  524. _22 = pxTimer_14->pxCallbackFunction;
  525. _22 (pxTimer_14);
  526. goto <bb 22>; [100.00%]
  527. <bb 14> [local count: 1952255]:
  528. # pxTimer_20 = PHI <pxTimer_47(8)>
  529. <L21>:
  530. # DEBUG BEGIN_STMT
  531. _23 = pxTimer_20->ucStatus;
  532. _24 = _23 & 254;
  533. pxTimer_20->ucStatus = _24;
  534. # DEBUG BEGIN_STMT
  535. goto <bb 22>; [100.00%]
  536. <bb 15> [local count: 1952255]:
  537. # pxTimer_44 = PHI <pxTimer_47(8)>
  538. # xTimeNow_67 = PHI <xTimeNow_50(8)>
  539. <L23>:
  540. # DEBUG BEGIN_STMT
  541. _25 = pxTimer_44->ucStatus;
  542. _26 = _25 | 1;
  543. pxTimer_44->ucStatus = _26;
  544. # DEBUG BEGIN_STMT
  545. _27 = xMessage.u.xTimerParameters.xMessageValue;
  546. pxTimer_44->xTimerPeriodInTicks = _27;
  547. # DEBUG BEGIN_STMT
  548. if (_27 == 0)
  549. goto <bb 16>; [5.50%]
  550. else
  551. goto <bb 18>; [94.50%]
  552. <bb 16> [local count: 107374]:
  553. # DEBUG BEGIN_STMT
  554. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  555. # DEBUG BEGIN_STMT
  556. # DEBUG BEGIN_STMT
  557. __asm__ __volatile__(" mov %0, %1
  558. msr basepri, %0
  559. isb
  560. dsb
  561. " : "=r" ulNewBASEPRI_64 : "i" 16 : "memory");
  562. # DEBUG ulNewBASEPRI => ulNewBASEPRI_64
  563. <bb 17> [local count: 1073741824]:
  564. # DEBUG ulNewBASEPRI => NULL
  565. # DEBUG BEGIN_STMT
  566. # DEBUG BEGIN_STMT
  567. # DEBUG BEGIN_STMT
  568. <bb 27> [local count: 1073741824]:
  569. goto <bb 17>; [100.00%]
  570. <bb 18> [local count: 1844881]:
  571. # DEBUG BEGIN_STMT
  572. # DEBUG BEGIN_STMT
  573. _30 = _27 + xTimeNow_67;
  574. prvInsertTimerInActiveList (pxTimer_44, _30, xTimeNow_67, xTimeNow_67);
  575. # DEBUG BEGIN_STMT
  576. goto <bb 22>; [100.00%]
  577. <bb 19> [local count: 1952255]:
  578. # pxTimer_56 = PHI <pxTimer_47(8)>
  579. <L28>:
  580. # DEBUG BEGIN_STMT
  581. _31 = pxTimer_56->ucStatus;
  582. _63 = _31 & 2;
  583. if (_63 == 0)
  584. goto <bb 20>; [33.00%]
  585. else
  586. goto <bb 21>; [67.00%]
  587. <bb 20> [local count: 644244]:
  588. # DEBUG BEGIN_STMT
  589. vPortFree (pxTimer_56);
  590. goto <bb 22>; [100.00%]
  591. <bb 21> [local count: 1308011]:
  592. # DEBUG BEGIN_STMT
  593. _33 = _31 & 254;
  594. pxTimer_56->ucStatus = _33;
  595. <bb 22> [local count: 7701644]:
  596. <bb 23> [local count: 18138407]:
  597. <bb 24> [local count: 20090662]:
  598. <L38>:
  599. <bb 25> [local count: 187807075]:
  600. # DEBUG BEGIN_STMT
  601. xTimerQueue.16_34 = xTimerQueue;
  602. _35 = xQueueReceive (xTimerQueue.16_34, &xMessage, 0);
  603. if (_35 != 0)
  604. goto <bb 3>; [94.50%]
  605. else
  606. goto <bb 26>; [5.50%]
  607. <bb 26> [local count: 10329389]:
  608. xMessage ={v} {CLOBBER};
  609. xTimerListsWereSwitched ={v} {CLOBBER};
  610. return;
  611. }
  612. prvInsertTimerInActiveList (struct Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime)
  613. {
  614. BaseType_t xProcessTimerNow;
  615. long unsigned int _1;
  616. long unsigned int _2;
  617. struct List_t * pxCurrentTimerList.15_3;
  618. struct ListItem_t * _4;
  619. <bb 2> [local count: 1073741824]:
  620. # DEBUG BEGIN_STMT
  621. # DEBUG xProcessTimerNow => 0
  622. # DEBUG BEGIN_STMT
  623. pxTimer_8(D)->xTimerListItem.xItemValue = xNextExpiryTime_9(D);
  624. # DEBUG BEGIN_STMT
  625. pxTimer_8(D)->xTimerListItem.pvOwner = pxTimer_8(D);
  626. # DEBUG BEGIN_STMT
  627. if (xNextExpiryTime_9(D) <= xTimeNow_12(D))
  628. goto <bb 3>; [50.00%]
  629. else
  630. goto <bb 5>; [50.00%]
  631. <bb 3> [local count: 536870913]:
  632. # DEBUG BEGIN_STMT
  633. _1 = xTimeNow_12(D) - xCommandTime_13(D);
  634. _2 = pxTimer_8(D)->xTimerPeriodInTicks;
  635. if (_1 >= _2)
  636. goto <bb 8>; [67.00%]
  637. else
  638. goto <bb 4>; [33.00%]
  639. <bb 4> [local count: 177167400]:
  640. # DEBUG D#1 => xNextExpiryTime_9(D)
  641. # DEBUG D#2 => xTimeNow_12(D)
  642. # DEBUG D#3 => xCommandTime_13(D)
  643. xProcessTimerNow_16 = prvInsertTimerInActiveList.part.0 (pxTimer_8(D));
  644. goto <bb 8>; [100.00%]
  645. <bb 5> [local count: 536870913]:
  646. # DEBUG BEGIN_STMT
  647. if (xTimeNow_12(D) < xCommandTime_13(D))
  648. goto <bb 6>; [67.00%]
  649. else
  650. goto <bb 7>; [33.00%]
  651. <bb 6> [local count: 359703511]:
  652. if (xNextExpiryTime_9(D) >= xCommandTime_13(D))
  653. goto <bb 8>; [50.00%]
  654. else
  655. goto <bb 7>; [50.00%]
  656. <bb 7> [local count: 357019157]:
  657. # DEBUG BEGIN_STMT
  658. pxCurrentTimerList.15_3 = pxCurrentTimerList;
  659. _4 = &pxTimer_8(D)->xTimerListItem;
  660. vListInsert (pxCurrentTimerList.15_3, _4);
  661. <bb 8> [local count: 1073741824]:
  662. # xProcessTimerNow_5 = PHI <xProcessTimerNow_16(4), 1(6), 0(7), 1(3)>
  663. # DEBUG xProcessTimerNow => xProcessTimerNow_5
  664. # DEBUG BEGIN_STMT
  665. return xProcessTimerNow_5;
  666. }
  667. prvSampleTimeNow (BaseType_t * const pxTimerListsWereSwitched)
  668. {
  669. static TickType_t xLastTime = 0;
  670. TickType_t xTimeNow;
  671. long unsigned int xLastTime.9_1;
  672. <bb 2> [local count: 1073741824]:
  673. # DEBUG BEGIN_STMT
  674. # DEBUG BEGIN_STMT
  675. # DEBUG BEGIN_STMT
  676. xTimeNow_5 = xTaskGetTickCount ();
  677. # DEBUG xTimeNow => xTimeNow_5
  678. # DEBUG BEGIN_STMT
  679. xLastTime.9_1 = xLastTime;
  680. if (xLastTime.9_1 > xTimeNow_5)
  681. goto <bb 3>; [33.00%]
  682. else
  683. goto <bb 4>; [67.00%]
  684. <bb 3> [local count: 354334802]:
  685. # DEBUG BEGIN_STMT
  686. prvSwitchTimerLists ();
  687. # DEBUG BEGIN_STMT
  688. *pxTimerListsWereSwitched_6(D) = 1;
  689. goto <bb 5>; [100.00%]
  690. <bb 4> [local count: 719407023]:
  691. # DEBUG BEGIN_STMT
  692. *pxTimerListsWereSwitched_6(D) = 0;
  693. <bb 5> [local count: 1073741824]:
  694. # DEBUG BEGIN_STMT
  695. xLastTime = xTimeNow_5;
  696. # DEBUG BEGIN_STMT
  697. return xTimeNow_5;
  698. }
  699. prvGetNextExpireTime (BaseType_t * const pxListWasEmpty)
  700. {
  701. TickType_t xNextExpireTime;
  702. struct List_t * pxCurrentTimerList.3_1;
  703. long unsigned int _2;
  704. struct xLIST_ITEM * _3;
  705. long int iftmp.2_5;
  706. <bb 2> [local count: 1073741824]:
  707. # DEBUG BEGIN_STMT
  708. # DEBUG BEGIN_STMT
  709. pxCurrentTimerList.3_1 = pxCurrentTimerList;
  710. _2 ={v} pxCurrentTimerList.3_1->uxNumberOfItems;
  711. if (_2 == 0)
  712. goto <bb 4>; [50.00%]
  713. else
  714. goto <bb 3>; [50.00%]
  715. <bb 3> [local count: 536870913]:
  716. <bb 4> [local count: 1073741824]:
  717. # iftmp.2_5 = PHI <1(2), 0(3)>
  718. *pxListWasEmpty_7(D) = iftmp.2_5;
  719. # DEBUG BEGIN_STMT
  720. if (iftmp.2_5 == 0)
  721. goto <bb 5>; [50.00%]
  722. else
  723. goto <bb 6>; [50.00%]
  724. <bb 5> [local count: 536870913]:
  725. # DEBUG BEGIN_STMT
  726. _3 = pxCurrentTimerList.3_1->xListEnd.pxNext;
  727. xNextExpireTime_9 = _3->xItemValue;
  728. # DEBUG xNextExpireTime => xNextExpireTime_9
  729. <bb 6> [local count: 1073741824]:
  730. # xNextExpireTime_4 = PHI <xNextExpireTime_9(5), 0(4)>
  731. # DEBUG xNextExpireTime => xNextExpireTime_4
  732. # DEBUG BEGIN_STMT
  733. return xNextExpireTime_4;
  734. }
  735. prvProcessTimerOrBlockTask (const TickType_t xNextExpireTime, BaseType_t xListWasEmpty)
  736. {
  737. BaseType_t xTimerListsWereSwitched;
  738. TickType_t xTimeNow;
  739. long int xTimerListsWereSwitched.5_1;
  740. struct List_t * pxOverflowTimerList.7_2;
  741. long unsigned int _3;
  742. struct QueueDefinition * xTimerQueue.8_4;
  743. long unsigned int _5;
  744. long int _6;
  745. <bb 2> [local count: 1073741823]:
  746. # DEBUG BEGIN_STMT
  747. # DEBUG BEGIN_STMT
  748. # DEBUG BEGIN_STMT
  749. vTaskSuspendAll ();
  750. # DEBUG BEGIN_STMT
  751. xTimeNow_12 = prvSampleTimeNow (&xTimerListsWereSwitched);
  752. # DEBUG xTimeNow => xTimeNow_12
  753. # DEBUG BEGIN_STMT
  754. xTimerListsWereSwitched.5_1 = xTimerListsWereSwitched;
  755. if (xTimerListsWereSwitched.5_1 == 0)
  756. goto <bb 3>; [67.00%]
  757. else
  758. goto <bb 12>; [33.00%]
  759. <bb 3> [local count: 719407022]:
  760. # DEBUG BEGIN_STMT
  761. if (xListWasEmpty_14(D) == 0)
  762. goto <bb 4>; [50.00%]
  763. else
  764. goto <bb 6>; [50.00%]
  765. <bb 4> [local count: 359703511]:
  766. if (xTimeNow_12 >= xNextExpireTime_15(D))
  767. goto <bb 5>; [33.00%]
  768. else
  769. goto <bb 6>; [67.00%]
  770. <bb 5> [local count: 118702158]:
  771. # DEBUG BEGIN_STMT
  772. xTaskResumeAll ();
  773. # DEBUG BEGIN_STMT
  774. prvProcessExpiredTimer (xNextExpireTime_15(D), xTimeNow_12);
  775. goto <bb 13>; [100.00%]
  776. <bb 6> [local count: 600704864]:
  777. # DEBUG BEGIN_STMT
  778. if (xListWasEmpty_14(D) != 0)
  779. goto <bb 7>; [50.00%]
  780. else
  781. goto <bb 10>; [50.00%]
  782. <bb 7> [local count: 300352432]:
  783. # DEBUG BEGIN_STMT
  784. pxOverflowTimerList.7_2 = pxOverflowTimerList;
  785. _3 ={v} pxOverflowTimerList.7_2->uxNumberOfItems;
  786. if (_3 == 0)
  787. goto <bb 10>; [50.00%]
  788. else
  789. goto <bb 8>; [50.00%]
  790. <bb 8> [local count: 150176216]:
  791. <bb 10> [local count: 600704864]:
  792. # xListWasEmpty_7 = PHI <xListWasEmpty_14(D)(6), 0(8), 1(7)>
  793. # DEBUG xListWasEmpty => xListWasEmpty_7
  794. # DEBUG BEGIN_STMT
  795. xTimerQueue.8_4 = xTimerQueue;
  796. _5 = xNextExpireTime_15(D) - xTimeNow_12;
  797. vQueueWaitForMessageRestricted (xTimerQueue.8_4, _5, xListWasEmpty_7);
  798. # DEBUG BEGIN_STMT
  799. _6 = xTaskResumeAll ();
  800. if (_6 == 0)
  801. goto <bb 11>; [50.00%]
  802. else
  803. goto <bb 13>; [50.00%]
  804. <bb 11> [local count: 300352432]:
  805. # DEBUG BEGIN_STMT
  806. MEM[(volatile uint32_t *)3758157060B] ={v} 268435456;
  807. # DEBUG BEGIN_STMT
  808. __asm__ __volatile__("dsb" : : : "memory");
  809. # DEBUG BEGIN_STMT
  810. __asm__ __volatile__("isb");
  811. # DEBUG BEGIN_STMT
  812. goto <bb 13>; [100.00%]
  813. <bb 12> [local count: 354334802]:
  814. # DEBUG BEGIN_STMT
  815. xTaskResumeAll ();
  816. <bb 13> [local count: 1073741824]:
  817. xTimerListsWereSwitched ={v} {CLOBBER};
  818. return;
  819. }
  820. prvTimerTask (void * pvParameters)
  821. {
  822. BaseType_t xListWasEmpty;
  823. TickType_t xNextExpireTime;
  824. long int xListWasEmpty.1_1;
  825. <bb 2> [local count: 107374]:
  826. <bb 3> [local count: 1073741824]:
  827. # DEBUG BEGIN_STMT
  828. # DEBUG BEGIN_STMT
  829. # DEBUG BEGIN_STMT
  830. # DEBUG BEGIN_STMT
  831. # DEBUG BEGIN_STMT
  832. xNextExpireTime_5 = prvGetNextExpireTime (&xListWasEmpty);
  833. # DEBUG xNextExpireTime => xNextExpireTime_5
  834. # DEBUG BEGIN_STMT
  835. xListWasEmpty.1_1 = xListWasEmpty;
  836. prvProcessTimerOrBlockTask (xNextExpireTime_5, xListWasEmpty.1_1);
  837. # DEBUG BEGIN_STMT
  838. prvProcessReceivedCommands ();
  839. # DEBUG BEGIN_STMT
  840. <bb 4> [local count: 1073741824]:
  841. goto <bb 3>; [100.00%]
  842. }
  843. prvProcessExpiredTimer (const TickType_t xNextExpireTime, const TickType_t xTimeNow)
  844. {
  845. struct Timer_t * const pxTimer;
  846. struct List_t * pxCurrentTimerList.13_1;
  847. struct xLIST_ITEM * _2;
  848. struct ListItem_t * _3;
  849. unsigned char _4;
  850. unsigned char _5;
  851. void (*<T689>) (struct tmrTimerControl *) _6;
  852. unsigned char _16;
  853. <bb 2> [local count: 1073741824]:
  854. # DEBUG BEGIN_STMT
  855. pxCurrentTimerList.13_1 = pxCurrentTimerList;
  856. _2 = pxCurrentTimerList.13_1->xListEnd.pxNext;
  857. pxTimer_9 = _2->pvOwner;
  858. # DEBUG pxTimer => pxTimer_9
  859. # DEBUG BEGIN_STMT
  860. _3 = &pxTimer_9->xTimerListItem;
  861. uxListRemove (_3);
  862. # DEBUG BEGIN_STMT
  863. _4 = pxTimer_9->ucStatus;
  864. _16 = _4 & 4;
  865. if (_16 != 0)
  866. goto <bb 3>; [33.00%]
  867. else
  868. goto <bb 4>; [67.00%]
  869. <bb 3> [local count: 354334802]:
  870. # DEBUG BEGIN_STMT
  871. prvReloadTimer (pxTimer_9, xNextExpireTime_12(D), xTimeNow_13(D));
  872. goto <bb 5>; [100.00%]
  873. <bb 4> [local count: 719407023]:
  874. # DEBUG BEGIN_STMT
  875. _5 = _4 & 254;
  876. pxTimer_9->ucStatus = _5;
  877. <bb 5> [local count: 1073741824]:
  878. # DEBUG BEGIN_STMT
  879. # DEBUG BEGIN_STMT
  880. _6 = pxTimer_9->pxCallbackFunction;
  881. _6 (pxTimer_9);
  882. return;
  883. }
  884. prvReloadTimer (struct Timer_t * const pxTimer, TickType_t xExpiredTime, const TickType_t xTimeNow)
  885. {
  886. long unsigned int _1;
  887. void (*<T689>) (struct tmrTimerControl *) _2;
  888. long unsigned int _3;
  889. long unsigned int _4;
  890. long int _5;
  891. <bb 2> [local count: 118111600]:
  892. # DEBUG BEGIN_STMT
  893. goto <bb 4>; [100.00%]
  894. <bb 3> [local count: 955630223]:
  895. # DEBUG BEGIN_STMT
  896. _1 = pxTimer_10(D)->xTimerPeriodInTicks;
  897. xExpiredTime_13 = _1 + xExpiredTime_6;
  898. # DEBUG xExpiredTime => xExpiredTime_13
  899. # DEBUG BEGIN_STMT
  900. # DEBUG BEGIN_STMT
  901. _2 = pxTimer_10(D)->pxCallbackFunction;
  902. _2 (pxTimer_10(D));
  903. <bb 4> [local count: 1073741824]:
  904. # xExpiredTime_6 = PHI <xExpiredTime_8(D)(2), xExpiredTime_13(3)>
  905. # DEBUG xExpiredTime => xExpiredTime_6
  906. # DEBUG BEGIN_STMT
  907. _3 = pxTimer_10(D)->xTimerPeriodInTicks;
  908. _4 = _3 + xExpiredTime_6;
  909. _5 = prvInsertTimerInActiveList (pxTimer_10(D), _4, xTimeNow_11(D), xExpiredTime_6);
  910. if (_5 != 0)
  911. goto <bb 3>; [89.00%]
  912. else
  913. goto <bb 5>; [11.00%]
  914. <bb 5> [local count: 118111601]:
  915. return;
  916. }
  917. pcTimerGetName (struct tmrTimerControl * xTimer)
  918. {
  919. uint32_t ulNewBASEPRI;
  920. const char * _3;
  921. <bb 2> [local count: 357913]:
  922. # DEBUG BEGIN_STMT
  923. # DEBUG pxTimer => xTimer_1(D)
  924. # DEBUG BEGIN_STMT
  925. if (xTimer_1(D) == 0B)
  926. goto <bb 3>; [30.00%]
  927. else
  928. goto <bb 5>; [70.00%]
  929. <bb 3> [local count: 107374]:
  930. # DEBUG BEGIN_STMT
  931. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  932. # DEBUG BEGIN_STMT
  933. # DEBUG BEGIN_STMT
  934. __asm__ __volatile__(" mov %0, %1
  935. msr basepri, %0
  936. isb
  937. dsb
  938. " : "=r" ulNewBASEPRI_4 : "i" 16 : "memory");
  939. # DEBUG ulNewBASEPRI => ulNewBASEPRI_4
  940. <bb 4> [local count: 1073741824]:
  941. # DEBUG ulNewBASEPRI => NULL
  942. # DEBUG BEGIN_STMT
  943. # DEBUG BEGIN_STMT
  944. # DEBUG BEGIN_STMT
  945. <bb 6> [local count: 1073741824]:
  946. goto <bb 4>; [100.00%]
  947. <bb 5> [local count: 250539]:
  948. # DEBUG BEGIN_STMT
  949. # DEBUG BEGIN_STMT
  950. _3 = MEM[(struct Timer_t *)xTimer_1(D)].pcTimerName;
  951. return _3;
  952. }
  953. xTimerGetExpiryTime (struct tmrTimerControl * xTimer)
  954. {
  955. uint32_t ulNewBASEPRI;
  956. TickType_t xReturn;
  957. <bb 2> [local count: 357913]:
  958. # DEBUG BEGIN_STMT
  959. # DEBUG pxTimer => xTimer_1(D)
  960. # DEBUG BEGIN_STMT
  961. # DEBUG BEGIN_STMT
  962. if (xTimer_1(D) == 0B)
  963. goto <bb 3>; [30.00%]
  964. else
  965. goto <bb 5>; [70.00%]
  966. <bb 3> [local count: 107374]:
  967. # DEBUG BEGIN_STMT
  968. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  969. # DEBUG BEGIN_STMT
  970. # DEBUG BEGIN_STMT
  971. __asm__ __volatile__(" mov %0, %1
  972. msr basepri, %0
  973. isb
  974. dsb
  975. " : "=r" ulNewBASEPRI_4 : "i" 16 : "memory");
  976. # DEBUG ulNewBASEPRI => ulNewBASEPRI_4
  977. <bb 4> [local count: 1073741824]:
  978. # DEBUG ulNewBASEPRI => NULL
  979. # DEBUG BEGIN_STMT
  980. # DEBUG BEGIN_STMT
  981. # DEBUG BEGIN_STMT
  982. <bb 6> [local count: 1073741824]:
  983. goto <bb 4>; [100.00%]
  984. <bb 5> [local count: 250539]:
  985. # DEBUG BEGIN_STMT
  986. # DEBUG BEGIN_STMT
  987. xReturn_3 = MEM[(struct Timer_t *)xTimer_1(D)].xTimerListItem.xItemValue;
  988. # DEBUG xReturn => xReturn_3
  989. # DEBUG BEGIN_STMT
  990. return xReturn_3;
  991. }
  992. uxTimerGetReloadMode (struct tmrTimerControl * xTimer)
  993. {
  994. uint32_t ulNewBASEPRI;
  995. UBaseType_t uxReturn;
  996. unsigned char _1;
  997. unsigned char _4;
  998. <bb 2> [local count: 230763]:
  999. # DEBUG BEGIN_STMT
  1000. # DEBUG pxTimer => xTimer_3(D)
  1001. # DEBUG BEGIN_STMT
  1002. # DEBUG BEGIN_STMT
  1003. if (xTimer_3(D) == 0B)
  1004. goto <bb 3>; [46.53%]
  1005. else
  1006. goto <bb 5>; [53.47%]
  1007. <bb 3> [local count: 107374]:
  1008. # DEBUG BEGIN_STMT
  1009. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1010. # DEBUG BEGIN_STMT
  1011. # DEBUG BEGIN_STMT
  1012. __asm__ __volatile__(" mov %0, %1
  1013. msr basepri, %0
  1014. isb
  1015. dsb
  1016. " : "=r" ulNewBASEPRI_8 : "i" 16 : "memory");
  1017. # DEBUG ulNewBASEPRI => ulNewBASEPRI_8
  1018. <bb 4> [local count: 1073741824]:
  1019. # DEBUG ulNewBASEPRI => NULL
  1020. # DEBUG BEGIN_STMT
  1021. # DEBUG BEGIN_STMT
  1022. # DEBUG BEGIN_STMT
  1023. <bb 8> [local count: 1073741824]:
  1024. goto <bb 4>; [100.00%]
  1025. <bb 5> [local count: 123389]:
  1026. # DEBUG BEGIN_STMT
  1027. # DEBUG BEGIN_STMT
  1028. vPortEnterCritical ();
  1029. # DEBUG BEGIN_STMT
  1030. _1 = MEM[(struct Timer_t *)xTimer_3(D)].ucStatus;
  1031. _4 = _1 & 4;
  1032. if (_4 == 0)
  1033. goto <bb 7>; [50.00%]
  1034. else
  1035. goto <bb 6>; [50.00%]
  1036. <bb 6> [local count: 61694]:
  1037. # DEBUG BEGIN_STMT
  1038. # DEBUG uxReturn => 1
  1039. <bb 7> [local count: 123389]:
  1040. # uxReturn_2 = PHI <0(5), 1(6)>
  1041. # DEBUG uxReturn => uxReturn_2
  1042. # DEBUG BEGIN_STMT
  1043. vPortExitCritical ();
  1044. # DEBUG BEGIN_STMT
  1045. return uxReturn_2;
  1046. }
  1047. vTimerSetReloadMode (struct tmrTimerControl * xTimer, const UBaseType_t uxAutoReload)
  1048. {
  1049. uint32_t ulNewBASEPRI;
  1050. unsigned char _1;
  1051. unsigned char _2;
  1052. unsigned char _3;
  1053. unsigned char _4;
  1054. <bb 2> [local count: 230763]:
  1055. # DEBUG BEGIN_STMT
  1056. # DEBUG pxTimer => xTimer_6(D)
  1057. # DEBUG BEGIN_STMT
  1058. if (xTimer_6(D) == 0B)
  1059. goto <bb 3>; [46.53%]
  1060. else
  1061. goto <bb 5>; [53.47%]
  1062. <bb 3> [local count: 107374]:
  1063. # DEBUG BEGIN_STMT
  1064. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1065. # DEBUG BEGIN_STMT
  1066. # DEBUG BEGIN_STMT
  1067. __asm__ __volatile__(" mov %0, %1
  1068. msr basepri, %0
  1069. isb
  1070. dsb
  1071. " : "=r" ulNewBASEPRI_13 : "i" 16 : "memory");
  1072. # DEBUG ulNewBASEPRI => ulNewBASEPRI_13
  1073. <bb 4> [local count: 1073741824]:
  1074. # DEBUG ulNewBASEPRI => NULL
  1075. # DEBUG BEGIN_STMT
  1076. # DEBUG BEGIN_STMT
  1077. # DEBUG BEGIN_STMT
  1078. <bb 9> [local count: 1073741824]:
  1079. goto <bb 4>; [100.00%]
  1080. <bb 5> [local count: 123389]:
  1081. # DEBUG BEGIN_STMT
  1082. # DEBUG BEGIN_STMT
  1083. vPortEnterCritical ();
  1084. # DEBUG BEGIN_STMT
  1085. if (uxAutoReload_9(D) != 0)
  1086. goto <bb 6>; [50.00%]
  1087. else
  1088. goto <bb 7>; [50.00%]
  1089. <bb 6> [local count: 61694]:
  1090. # DEBUG BEGIN_STMT
  1091. _1 = MEM[(struct Timer_t *)xTimer_6(D)].ucStatus;
  1092. _2 = _1 | 4;
  1093. MEM[(struct Timer_t *)xTimer_6(D)].ucStatus = _2;
  1094. goto <bb 8>; [100.00%]
  1095. <bb 7> [local count: 61694]:
  1096. # DEBUG BEGIN_STMT
  1097. _3 = MEM[(struct Timer_t *)xTimer_6(D)].ucStatus;
  1098. _4 = _3 & 251;
  1099. MEM[(struct Timer_t *)xTimer_6(D)].ucStatus = _4;
  1100. <bb 8> [local count: 123389]:
  1101. # DEBUG BEGIN_STMT
  1102. vPortExitCritical ();
  1103. return;
  1104. }
  1105. xTimerGetPeriod (struct tmrTimerControl * xTimer)
  1106. {
  1107. uint32_t ulNewBASEPRI;
  1108. TickType_t _3;
  1109. <bb 2> [local count: 357913]:
  1110. # DEBUG BEGIN_STMT
  1111. # DEBUG pxTimer => xTimer_1(D)
  1112. # DEBUG BEGIN_STMT
  1113. if (xTimer_1(D) == 0B)
  1114. goto <bb 3>; [30.00%]
  1115. else
  1116. goto <bb 5>; [70.00%]
  1117. <bb 3> [local count: 107374]:
  1118. # DEBUG BEGIN_STMT
  1119. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1120. # DEBUG BEGIN_STMT
  1121. # DEBUG BEGIN_STMT
  1122. __asm__ __volatile__(" mov %0, %1
  1123. msr basepri, %0
  1124. isb
  1125. dsb
  1126. " : "=r" ulNewBASEPRI_4 : "i" 16 : "memory");
  1127. # DEBUG ulNewBASEPRI => ulNewBASEPRI_4
  1128. <bb 4> [local count: 1073741824]:
  1129. # DEBUG ulNewBASEPRI => NULL
  1130. # DEBUG BEGIN_STMT
  1131. # DEBUG BEGIN_STMT
  1132. # DEBUG BEGIN_STMT
  1133. <bb 6> [local count: 1073741824]:
  1134. goto <bb 4>; [100.00%]
  1135. <bb 5> [local count: 250539]:
  1136. # DEBUG BEGIN_STMT
  1137. # DEBUG BEGIN_STMT
  1138. _3 = MEM[(struct Timer_t *)xTimer_1(D)].xTimerPeriodInTicks;
  1139. return _3;
  1140. }
  1141. xTimerGetTimerDaemonTaskHandle ()
  1142. {
  1143. uint32_t ulNewBASEPRI;
  1144. struct tskTaskControlBlock * xTimerTaskHandle.24_1;
  1145. <bb 2> [local count: 357913]:
  1146. # DEBUG BEGIN_STMT
  1147. xTimerTaskHandle.24_1 = xTimerTaskHandle;
  1148. if (xTimerTaskHandle.24_1 == 0B)
  1149. goto <bb 3>; [30.00%]
  1150. else
  1151. goto <bb 5>; [70.00%]
  1152. <bb 3> [local count: 107374]:
  1153. # DEBUG BEGIN_STMT
  1154. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1155. # DEBUG BEGIN_STMT
  1156. # DEBUG BEGIN_STMT
  1157. __asm__ __volatile__(" mov %0, %1
  1158. msr basepri, %0
  1159. isb
  1160. dsb
  1161. " : "=r" ulNewBASEPRI_3 : "i" 16 : "memory");
  1162. # DEBUG ulNewBASEPRI => ulNewBASEPRI_3
  1163. <bb 4> [local count: 1073741824]:
  1164. # DEBUG ulNewBASEPRI => NULL
  1165. # DEBUG BEGIN_STMT
  1166. # DEBUG BEGIN_STMT
  1167. # DEBUG BEGIN_STMT
  1168. <bb 6> [local count: 1073741824]:
  1169. goto <bb 4>; [100.00%]
  1170. <bb 5> [local count: 250539]:
  1171. # DEBUG BEGIN_STMT
  1172. # DEBUG BEGIN_STMT
  1173. return xTimerTaskHandle.24_1;
  1174. }
  1175. xTimerGenericCommand (struct tmrTimerControl * xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait)
  1176. {
  1177. uint32_t ulNewBASEPRI;
  1178. struct DaemonTaskMessage_t xMessage;
  1179. BaseType_t xReturn;
  1180. struct QueueDefinition * xTimerQueue.20_1;
  1181. long int _2;
  1182. struct QueueDefinition * xTimerQueue.21_3;
  1183. struct QueueDefinition * xTimerQueue.22_4;
  1184. <bb 2> [local count: 357913]:
  1185. # DEBUG BEGIN_STMT
  1186. # DEBUG xReturn => 0
  1187. # DEBUG BEGIN_STMT
  1188. # DEBUG BEGIN_STMT
  1189. if (xTimer_7(D) == 0B)
  1190. goto <bb 3>; [30.00%]
  1191. else
  1192. goto <bb 5>; [70.00%]
  1193. <bb 3> [local count: 107374]:
  1194. # DEBUG BEGIN_STMT
  1195. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1196. # DEBUG BEGIN_STMT
  1197. # DEBUG BEGIN_STMT
  1198. __asm__ __volatile__(" mov %0, %1
  1199. msr basepri, %0
  1200. isb
  1201. dsb
  1202. " : "=r" ulNewBASEPRI_24 : "i" 16 : "memory");
  1203. # DEBUG ulNewBASEPRI => ulNewBASEPRI_24
  1204. <bb 4> [local count: 1073741824]:
  1205. # DEBUG ulNewBASEPRI => NULL
  1206. # DEBUG BEGIN_STMT
  1207. # DEBUG BEGIN_STMT
  1208. # DEBUG BEGIN_STMT
  1209. <bb 12> [local count: 1073741824]:
  1210. goto <bb 4>; [100.00%]
  1211. <bb 5> [local count: 250539]:
  1212. # DEBUG BEGIN_STMT
  1213. # DEBUG BEGIN_STMT
  1214. xTimerQueue.20_1 = xTimerQueue;
  1215. if (xTimerQueue.20_1 != 0B)
  1216. goto <bb 6>; [70.00%]
  1217. else
  1218. goto <bb 11>; [30.00%]
  1219. <bb 6> [local count: 175378]:
  1220. # DEBUG BEGIN_STMT
  1221. xMessage.xMessageID = xCommandID_9(D);
  1222. # DEBUG BEGIN_STMT
  1223. xMessage.u.xTimerParameters.xMessageValue = xOptionalValue_11(D);
  1224. # DEBUG BEGIN_STMT
  1225. xMessage.u.xTimerParameters.pxTimer = xTimer_7(D);
  1226. # DEBUG BEGIN_STMT
  1227. if (xCommandID_9(D) <= 5)
  1228. goto <bb 7>; [50.00%]
  1229. else
  1230. goto <bb 10>; [50.00%]
  1231. <bb 7> [local count: 87689]:
  1232. # DEBUG BEGIN_STMT
  1233. _2 = xTaskGetSchedulerState ();
  1234. if (_2 == 2)
  1235. goto <bb 8>; [34.00%]
  1236. else
  1237. goto <bb 9>; [66.00%]
  1238. <bb 8> [local count: 29814]:
  1239. # DEBUG BEGIN_STMT
  1240. xTimerQueue.21_3 = xTimerQueue;
  1241. xReturn_22 = xQueueGenericSend (xTimerQueue.21_3, &xMessage, xTicksToWait_20(D), 0);
  1242. # DEBUG xReturn => xReturn_22
  1243. goto <bb 11>; [100.00%]
  1244. <bb 9> [local count: 57875]:
  1245. # DEBUG BEGIN_STMT
  1246. xTimerQueue.22_4 = xTimerQueue;
  1247. xReturn_19 = xQueueGenericSend (xTimerQueue.22_4, &xMessage, 0, 0);
  1248. # DEBUG xReturn => xReturn_19
  1249. goto <bb 11>; [100.00%]
  1250. <bb 10> [local count: 87689]:
  1251. # DEBUG BEGIN_STMT
  1252. xReturn_16 = xQueueGenericSendFromISR (xTimerQueue.20_1, &xMessage, pxHigherPriorityTaskWoken_14(D), 0);
  1253. # DEBUG xReturn => xReturn_16
  1254. <bb 11> [local count: 250539]:
  1255. # xReturn_5 = PHI <0(5), xReturn_16(10), xReturn_19(9), xReturn_22(8)>
  1256. # DEBUG xReturn => xReturn_5
  1257. # DEBUG BEGIN_STMT
  1258. # DEBUG BEGIN_STMT
  1259. xMessage ={v} {CLOBBER};
  1260. return xReturn_5;
  1261. }
  1262. prvInitialiseNewTimer (const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, void (*TimerCallbackFunction_t) (struct tmrTimerControl *) pxCallbackFunction, struct Timer_t * pxNewTimer)
  1263. {
  1264. uint32_t ulNewBASEPRI;
  1265. struct ListItem_t * _1;
  1266. unsigned char _2;
  1267. unsigned char _3;
  1268. <bb 2> [local count: 160260]:
  1269. # DEBUG BEGIN_STMT
  1270. if (xTimerPeriodInTicks_5(D) == 0)
  1271. goto <bb 3>; [67.00%]
  1272. else
  1273. goto <bb 5>; [33.00%]
  1274. <bb 3> [local count: 107374]:
  1275. # DEBUG BEGIN_STMT
  1276. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1277. # DEBUG BEGIN_STMT
  1278. # DEBUG BEGIN_STMT
  1279. __asm__ __volatile__(" mov %0, %1
  1280. msr basepri, %0
  1281. isb
  1282. dsb
  1283. " : "=r" ulNewBASEPRI_19 : "i" 16 : "memory");
  1284. # DEBUG ulNewBASEPRI => ulNewBASEPRI_19
  1285. <bb 4> [local count: 1073741824]:
  1286. # DEBUG ulNewBASEPRI => NULL
  1287. # DEBUG BEGIN_STMT
  1288. # DEBUG BEGIN_STMT
  1289. # DEBUG BEGIN_STMT
  1290. <bb 8> [local count: 1073741824]:
  1291. goto <bb 4>; [100.00%]
  1292. <bb 5> [local count: 52886]:
  1293. # DEBUG BEGIN_STMT
  1294. # DEBUG BEGIN_STMT
  1295. prvCheckForValidListAndQueue ();
  1296. # DEBUG BEGIN_STMT
  1297. pxNewTimer_8(D)->pcTimerName = pcTimerName_9(D);
  1298. # DEBUG BEGIN_STMT
  1299. pxNewTimer_8(D)->xTimerPeriodInTicks = xTimerPeriodInTicks_5(D);
  1300. # DEBUG BEGIN_STMT
  1301. pxNewTimer_8(D)->pvTimerID = pvTimerID_12(D);
  1302. # DEBUG BEGIN_STMT
  1303. pxNewTimer_8(D)->pxCallbackFunction = pxCallbackFunction_14(D);
  1304. # DEBUG BEGIN_STMT
  1305. _1 = &pxNewTimer_8(D)->xTimerListItem;
  1306. vListInitialiseItem (_1);
  1307. # DEBUG BEGIN_STMT
  1308. if (uxAutoReload_17(D) != 0)
  1309. goto <bb 6>; [50.00%]
  1310. else
  1311. goto <bb 7>; [50.00%]
  1312. <bb 6> [local count: 26443]:
  1313. # DEBUG BEGIN_STMT
  1314. _2 = pxNewTimer_8(D)->ucStatus;
  1315. _3 = _2 | 4;
  1316. pxNewTimer_8(D)->ucStatus = _3;
  1317. <bb 7> [local count: 52886]:
  1318. # DEBUG BEGIN_STMT
  1319. return;
  1320. }
  1321. xTimerCreate (const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, void (*TimerCallbackFunction_t) (struct tmrTimerControl *) pxCallbackFunction)
  1322. {
  1323. struct Timer_t * pxNewTimer;
  1324. <bb 2> [local count: 1073741824]:
  1325. # DEBUG BEGIN_STMT
  1326. # DEBUG BEGIN_STMT
  1327. pxNewTimer_4 = pvPortMalloc (44);
  1328. # DEBUG pxNewTimer => pxNewTimer_4
  1329. # DEBUG BEGIN_STMT
  1330. if (pxNewTimer_4 != 0B)
  1331. goto <bb 3>; [53.47%]
  1332. else
  1333. goto <bb 4>; [46.53%]
  1334. <bb 3> [local count: 574129754]:
  1335. # DEBUG BEGIN_STMT
  1336. pxNewTimer_4->ucStatus = 0;
  1337. # DEBUG BEGIN_STMT
  1338. prvInitialiseNewTimer (pcTimerName_6(D), xTimerPeriodInTicks_7(D), uxAutoReload_8(D), pvTimerID_9(D), pxCallbackFunction_10(D), pxNewTimer_4);
  1339. <bb 4> [local count: 1073741824]:
  1340. # DEBUG BEGIN_STMT
  1341. return pxNewTimer_4;
  1342. }
  1343. xTimerCreateTimerTask ()
  1344. {
  1345. uint32_t ulNewBASEPRI;
  1346. BaseType_t xReturn;
  1347. struct QueueDefinition * xTimerQueue.0_1;
  1348. <bb 2> [local count: 146556]:
  1349. # DEBUG BEGIN_STMT
  1350. # DEBUG xReturn => 0
  1351. # DEBUG BEGIN_STMT
  1352. prvCheckForValidListAndQueue ();
  1353. # DEBUG BEGIN_STMT
  1354. xTimerQueue.0_1 = xTimerQueue;
  1355. if (xTimerQueue.0_1 != 0B)
  1356. goto <bb 4>; [53.47%]
  1357. else
  1358. goto <bb 5>; [46.53%]
  1359. <bb 4> [local count: 78363]:
  1360. # DEBUG BEGIN_STMT
  1361. xReturn_5 = xTaskCreate (prvTimerTask, "Tmr Svc", 180, 0B, 2, &xTimerTaskHandle);
  1362. # DEBUG xReturn => xReturn_5
  1363. # DEBUG BEGIN_STMT
  1364. # DEBUG BEGIN_STMT
  1365. if (xReturn_5 == 0)
  1366. goto <bb 5>; [50.00%]
  1367. else
  1368. goto <bb 7>; [50.00%]
  1369. <bb 5> [local count: 107374]:
  1370. # DEBUG xReturn => NULL
  1371. # DEBUG BEGIN_STMT
  1372. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  1373. # DEBUG BEGIN_STMT
  1374. # DEBUG BEGIN_STMT
  1375. __asm__ __volatile__(" mov %0, %1
  1376. msr basepri, %0
  1377. isb
  1378. dsb
  1379. " : "=r" ulNewBASEPRI_7 : "i" 16 : "memory");
  1380. # DEBUG ulNewBASEPRI => ulNewBASEPRI_7
  1381. <bb 6> [local count: 1073741824]:
  1382. # DEBUG ulNewBASEPRI => NULL
  1383. # DEBUG BEGIN_STMT
  1384. # DEBUG BEGIN_STMT
  1385. # DEBUG BEGIN_STMT
  1386. <bb 8> [local count: 1073741824]:
  1387. goto <bb 6>; [100.00%]
  1388. <bb 7> [local count: 39182]:
  1389. # DEBUG BEGIN_STMT
  1390. # DEBUG BEGIN_STMT
  1391. return xReturn_5;
  1392. }