timers.c.082i.materialize-all-clones 38 KB

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