timers.c.081i.comdats 36 KB

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