timers.c.080i.single-use 36 KB

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