timers.c.069i.profile_estimate 38 KB

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