event_groups.c.064i.free-fnsummary1 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990
  1. vEventGroupSetNumber (void * xEventGroup, UBaseType_t uxEventGroupNumber)
  2. {
  3. <bb 2> :
  4. MEM[(struct EventGroup_t *)xEventGroup_2(D)].uxEventGroupNumber = uxEventGroupNumber_3(D);
  5. return;
  6. }
  7. uxEventGroupGetNumber (void * xEventGroup)
  8. {
  9. const struct EventGroup_t * pxEventBits;
  10. UBaseType_t xReturn;
  11. UBaseType_t D.6567;
  12. UBaseType_t _7;
  13. <bb 2> :
  14. pxEventBits_3 = xEventGroup_2(D);
  15. if (xEventGroup_2(D) == 0B)
  16. goto <bb 3>; [INV]
  17. else
  18. goto <bb 4>; [INV]
  19. <bb 3> :
  20. xReturn_6 = 0;
  21. goto <bb 5>; [INV]
  22. <bb 4> :
  23. xReturn_5 = pxEventBits_3->uxEventGroupNumber;
  24. <bb 5> :
  25. # xReturn_1 = PHI <xReturn_6(3), xReturn_5(4)>
  26. _7 = xReturn_1;
  27. <bb 6> :
  28. <L3>:
  29. return _7;
  30. }
  31. xEventGroupSetBitsFromISR (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet, BaseType_t * pxHigherPriorityTaskWoken)
  32. {
  33. BaseType_t xReturn;
  34. BaseType_t D.6562;
  35. BaseType_t _7;
  36. <bb 2> :
  37. xReturn_6 = xTimerPendFunctionCallFromISR (vEventGroupSetBitsCallback, xEventGroup_2(D), uxBitsToSet_3(D), pxHigherPriorityTaskWoken_4(D));
  38. _7 = xReturn_6;
  39. <bb 3> :
  40. <L0>:
  41. return _7;
  42. }
  43. prvTestWaitCondition (const EventBits_t uxCurrentEventBits, const EventBits_t uxBitsToWaitFor, const BaseType_t xWaitForAllBits)
  44. {
  45. BaseType_t xWaitConditionMet;
  46. BaseType_t D.6560;
  47. long unsigned int _1;
  48. long unsigned int _2;
  49. BaseType_t _10;
  50. <bb 2> :
  51. xWaitConditionMet_4 = 0;
  52. if (xWaitForAllBits_5(D) == 0)
  53. goto <bb 3>; [INV]
  54. else
  55. goto <bb 5>; [INV]
  56. <bb 3> :
  57. _1 = uxCurrentEventBits_6(D) & uxBitsToWaitFor_7(D);
  58. if (_1 != 0)
  59. goto <bb 4>; [INV]
  60. else
  61. goto <bb 7>; [INV]
  62. <bb 4> :
  63. xWaitConditionMet_9 = 1;
  64. goto <bb 7>; [INV]
  65. <bb 5> :
  66. _2 = uxCurrentEventBits_6(D) & uxBitsToWaitFor_7(D);
  67. if (uxBitsToWaitFor_7(D) == _2)
  68. goto <bb 6>; [INV]
  69. else
  70. goto <bb 7>; [INV]
  71. <bb 6> :
  72. xWaitConditionMet_8 = 1;
  73. <bb 7> :
  74. # xWaitConditionMet_3 = PHI <xWaitConditionMet_9(4), xWaitConditionMet_4(5), xWaitConditionMet_8(6), xWaitConditionMet_4(3)>
  75. _10 = xWaitConditionMet_3;
  76. <bb 8> :
  77. <L9>:
  78. return _10;
  79. }
  80. vEventGroupClearBitsCallback (void * pvEventGroup, const uint32_t ulBitsToClear)
  81. {
  82. <bb 2> :
  83. xEventGroupClearBits (pvEventGroup_2(D), ulBitsToClear_3(D));
  84. return;
  85. }
  86. vEventGroupSetBitsCallback (void * pvEventGroup, const uint32_t ulBitsToSet)
  87. {
  88. <bb 2> :
  89. xEventGroupSetBits (pvEventGroup_2(D), ulBitsToSet_3(D));
  90. return;
  91. }
  92. vEventGroupDelete (struct EventGroupDef_t * xEventGroup)
  93. {
  94. uint32_t ulNewBASEPRI;
  95. uint32_t ulNewBASEPRI;
  96. const struct List_t * pxTasksWaitingForBits;
  97. struct EventGroup_t * pxEventBits;
  98. struct xLIST_ITEM * _1;
  99. const struct MiniListItem_t * _2;
  100. struct xLIST_ITEM * _3;
  101. long unsigned int _4;
  102. <bb 2> :
  103. if (xEventGroup_6(D) == 0B)
  104. goto <bb 3>; [INV]
  105. else
  106. goto <bb 6>; [INV]
  107. <bb 3> :
  108. __asm__ __volatile__(" mov %0, %1
  109. msr basepri, %0
  110. isb
  111. dsb
  112. " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory");
  113. <bb 4> :
  114. <bb 5> :
  115. goto <bb 5>; [INV]
  116. <bb 6> :
  117. pxEventBits_7 = xEventGroup_6(D);
  118. pxTasksWaitingForBits_8 = &pxEventBits_7->xTasksWaitingForBits;
  119. vTaskSuspendAll ();
  120. goto <bb 12>; [INV]
  121. <bb 7> :
  122. _1 = pxTasksWaitingForBits_8->xListEnd.pxNext;
  123. _2 = &pxTasksWaitingForBits_8->xListEnd;
  124. if (_1 == _2)
  125. goto <bb 8>; [INV]
  126. else
  127. goto <bb 11>; [INV]
  128. <bb 8> :
  129. __asm__ __volatile__(" mov %0, %1
  130. msr basepri, %0
  131. isb
  132. dsb
  133. " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
  134. <bb 9> :
  135. <bb 10> :
  136. goto <bb 10>; [INV]
  137. <bb 11> :
  138. _3 = pxTasksWaitingForBits_8->xListEnd.pxNext;
  139. vTaskRemoveFromUnorderedEventList (_3, 33554432);
  140. <bb 12> :
  141. _4 ={v} pxTasksWaitingForBits_8->uxNumberOfItems;
  142. if (_4 != 0)
  143. goto <bb 7>; [INV]
  144. else
  145. goto <bb 13>; [INV]
  146. <bb 13> :
  147. vPortFree (pxEventBits_7);
  148. xTaskResumeAll ();
  149. return;
  150. }
  151. xEventGroupSetBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet)
  152. {
  153. uint32_t ulNewBASEPRI;
  154. uint32_t ulNewBASEPRI;
  155. BaseType_t xMatchFound;
  156. struct EventGroup_t * pxEventBits;
  157. EventBits_t uxControlBits;
  158. EventBits_t uxBitsWaitedFor;
  159. EventBits_t uxBitsToClear;
  160. const struct List_t * pxList;
  161. const struct ListItem_t * pxListEnd;
  162. struct ListItem_t * pxNext;
  163. struct ListItem_t * pxListItem;
  164. EventBits_t D.6545;
  165. long unsigned int _1;
  166. long unsigned int _2;
  167. long unsigned int _3;
  168. long unsigned int _4;
  169. long unsigned int _5;
  170. long unsigned int _6;
  171. long unsigned int _7;
  172. long unsigned int _8;
  173. long unsigned int _9;
  174. long unsigned int _10;
  175. long unsigned int _11;
  176. long unsigned int _12;
  177. long unsigned int _13;
  178. long unsigned int _14;
  179. EventBits_t _35;
  180. <bb 2> :
  181. uxBitsToClear_22 = 0;
  182. pxEventBits_24 = xEventGroup_23(D);
  183. xMatchFound_25 = 0;
  184. if (xEventGroup_23(D) == 0B)
  185. goto <bb 3>; [INV]
  186. else
  187. goto <bb 6>; [INV]
  188. <bb 3> :
  189. __asm__ __volatile__(" mov %0, %1
  190. msr basepri, %0
  191. isb
  192. dsb
  193. " : "=r" ulNewBASEPRI_46 : "i" 16 : "memory");
  194. <bb 4> :
  195. <bb 5> :
  196. goto <bb 5>; [INV]
  197. <bb 6> :
  198. _1 = uxBitsToSet_26(D) & 4278190080;
  199. if (_1 != 0)
  200. goto <bb 7>; [INV]
  201. else
  202. goto <bb 10>; [INV]
  203. <bb 7> :
  204. __asm__ __volatile__(" mov %0, %1
  205. msr basepri, %0
  206. isb
  207. dsb
  208. " : "=r" ulNewBASEPRI_47 : "i" 16 : "memory");
  209. <bb 8> :
  210. <bb 9> :
  211. goto <bb 9>; [INV]
  212. <bb 10> :
  213. pxList_27 = &pxEventBits_24->xTasksWaitingForBits;
  214. pxListEnd_28 = &pxList_27->xListEnd;
  215. vTaskSuspendAll ();
  216. pxListItem_31 = pxList_27->xListEnd.pxNext;
  217. _2 = pxEventBits_24->uxEventBits;
  218. _3 = uxBitsToSet_26(D) | _2;
  219. pxEventBits_24->uxEventBits = _3;
  220. goto <bb 21>; [INV]
  221. <bb 11> :
  222. pxNext_36 = pxListItem_15->pxNext;
  223. uxBitsWaitedFor_37 = pxListItem_15->xItemValue;
  224. xMatchFound_38 = 0;
  225. uxControlBits_39 = uxBitsWaitedFor_37 & 4278190080;
  226. uxBitsWaitedFor_40 = uxBitsWaitedFor_37 & 16777215;
  227. _4 = uxControlBits_39 & 67108864;
  228. if (_4 == 0)
  229. goto <bb 12>; [INV]
  230. else
  231. goto <bb 14>; [INV]
  232. <bb 12> :
  233. _5 = pxEventBits_24->uxEventBits;
  234. _6 = uxBitsWaitedFor_40 & _5;
  235. if (_6 != 0)
  236. goto <bb 13>; [INV]
  237. else
  238. goto <bb 16>; [INV]
  239. <bb 13> :
  240. xMatchFound_42 = 1;
  241. goto <bb 16>; [INV]
  242. <bb 14> :
  243. _7 = pxEventBits_24->uxEventBits;
  244. _8 = uxBitsWaitedFor_40 & _7;
  245. if (uxBitsWaitedFor_40 == _8)
  246. goto <bb 15>; [INV]
  247. else
  248. goto <bb 16>; [INV]
  249. <bb 15> :
  250. xMatchFound_41 = 1;
  251. <bb 16> :
  252. # xMatchFound_19 = PHI <xMatchFound_42(13), xMatchFound_38(14), xMatchFound_41(15), xMatchFound_38(12)>
  253. if (xMatchFound_19 != 0)
  254. goto <bb 17>; [INV]
  255. else
  256. goto <bb 20>; [INV]
  257. <bb 17> :
  258. _9 = uxControlBits_39 & 16777216;
  259. if (_9 != 0)
  260. goto <bb 18>; [INV]
  261. else
  262. goto <bb 19>; [INV]
  263. <bb 18> :
  264. uxBitsToClear_43 = uxBitsToClear_18 | uxBitsWaitedFor_40;
  265. <bb 19> :
  266. # uxBitsToClear_16 = PHI <uxBitsToClear_18(17), uxBitsToClear_43(18)>
  267. _10 = pxEventBits_24->uxEventBits;
  268. _11 = _10 | 33554432;
  269. vTaskRemoveFromUnorderedEventList (pxListItem_15, _11);
  270. <bb 20> :
  271. # uxBitsToClear_17 = PHI <uxBitsToClear_18(16), uxBitsToClear_16(19)>
  272. pxListItem_45 = pxNext_36;
  273. <bb 21> :
  274. # pxListItem_15 = PHI <pxListItem_31(10), pxListItem_45(20)>
  275. # uxBitsToClear_18 = PHI <uxBitsToClear_22(10), uxBitsToClear_17(20)>
  276. if (pxListItem_15 != pxListEnd_28)
  277. goto <bb 11>; [INV]
  278. else
  279. goto <bb 22>; [INV]
  280. <bb 22> :
  281. _12 = pxEventBits_24->uxEventBits;
  282. _13 = ~uxBitsToClear_18;
  283. _14 = _12 & _13;
  284. pxEventBits_24->uxEventBits = _14;
  285. xTaskResumeAll ();
  286. _35 = pxEventBits_24->uxEventBits;
  287. <bb 23> :
  288. <L23>:
  289. return _35;
  290. }
  291. xEventGroupGetBitsFromISR (struct EventGroupDef_t * xEventGroup)
  292. {
  293. uint32_t D.6592;
  294. uint32_t ulOriginalBASEPRI;
  295. uint32_t ulNewBASEPRI;
  296. uint32_t D.6591;
  297. uint32_t ulNewMaskValue;
  298. EventBits_t uxReturn;
  299. const struct EventGroup_t * const pxEventBits;
  300. UBaseType_t uxSavedInterruptStatus;
  301. EventBits_t D.6523;
  302. EventBits_t _6;
  303. long unsigned int _10;
  304. <bb 2> :
  305. pxEventBits_2 = xEventGroup_1(D);
  306. __asm__ __volatile__(" mrs %0, basepri
  307. mov %1, %2
  308. msr basepri, %1
  309. isb
  310. dsb
  311. " : "=r" ulOriginalBASEPRI_8, "=r" ulNewBASEPRI_9 : "i" 16 : "memory");
  312. _10 = ulOriginalBASEPRI_8;
  313. <bb 3> :
  314. <L1>:
  315. _12 = _10;
  316. <bb 4> :
  317. uxSavedInterruptStatus_4 = _12;
  318. uxReturn_5 = pxEventBits_2->uxEventBits;
  319. ulNewMaskValue_7 = uxSavedInterruptStatus_4;
  320. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue_7 : "memory");
  321. <bb 5> :
  322. _6 = uxReturn_5;
  323. <bb 6> :
  324. <L0>:
  325. return _6;
  326. }
  327. xEventGroupClearBitsFromISR (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToClear)
  328. {
  329. BaseType_t xReturn;
  330. BaseType_t D.6521;
  331. BaseType_t _6;
  332. <bb 2> :
  333. xReturn_5 = xTimerPendFunctionCallFromISR (vEventGroupClearBitsCallback, xEventGroup_2(D), uxBitsToClear_3(D), 0B);
  334. _6 = xReturn_5;
  335. <bb 3> :
  336. <L0>:
  337. return _6;
  338. }
  339. xEventGroupClearBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToClear)
  340. {
  341. uint32_t ulNewBASEPRI;
  342. uint32_t ulNewBASEPRI;
  343. EventBits_t uxReturn;
  344. struct EventGroup_t * pxEventBits;
  345. EventBits_t D.6519;
  346. long unsigned int _1;
  347. long unsigned int _2;
  348. long unsigned int _3;
  349. long unsigned int _4;
  350. EventBits_t _13;
  351. <bb 2> :
  352. pxEventBits_6 = xEventGroup_5(D);
  353. if (xEventGroup_5(D) == 0B)
  354. goto <bb 3>; [INV]
  355. else
  356. goto <bb 6>; [INV]
  357. <bb 3> :
  358. __asm__ __volatile__(" mov %0, %1
  359. msr basepri, %0
  360. isb
  361. dsb
  362. " : "=r" ulNewBASEPRI_14 : "i" 16 : "memory");
  363. <bb 4> :
  364. <bb 5> :
  365. goto <bb 5>; [INV]
  366. <bb 6> :
  367. _1 = uxBitsToClear_7(D) & 4278190080;
  368. if (_1 != 0)
  369. goto <bb 7>; [INV]
  370. else
  371. goto <bb 10>; [INV]
  372. <bb 7> :
  373. __asm__ __volatile__(" mov %0, %1
  374. msr basepri, %0
  375. isb
  376. dsb
  377. " : "=r" ulNewBASEPRI_15 : "i" 16 : "memory");
  378. <bb 8> :
  379. <bb 9> :
  380. goto <bb 9>; [INV]
  381. <bb 10> :
  382. vPortEnterCritical ();
  383. uxReturn_10 = pxEventBits_6->uxEventBits;
  384. _2 = pxEventBits_6->uxEventBits;
  385. _3 = ~uxBitsToClear_7(D);
  386. _4 = _2 & _3;
  387. pxEventBits_6->uxEventBits = _4;
  388. vPortExitCritical ();
  389. _13 = uxReturn_10;
  390. <bb 11> :
  391. <L6>:
  392. return _13;
  393. }
  394. xEventGroupWaitBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait)
  395. {
  396. uint32_t ulNewBASEPRI;
  397. uint32_t ulNewBASEPRI;
  398. uint32_t ulNewBASEPRI;
  399. uint32_t ulNewBASEPRI;
  400. const EventBits_t uxCurrentEventBits;
  401. BaseType_t xTimeoutOccurred;
  402. BaseType_t xAlreadyYielded;
  403. BaseType_t xWaitConditionMet;
  404. EventBits_t uxControlBits;
  405. EventBits_t uxReturn;
  406. struct EventGroup_t * pxEventBits;
  407. EventBits_t D.6513;
  408. int iftmp.1;
  409. long unsigned int _1;
  410. long int _2;
  411. long unsigned int _3;
  412. long unsigned int _4;
  413. long unsigned int _5;
  414. struct List_t * _6;
  415. long unsigned int _7;
  416. volatile uint32_t * _8;
  417. long unsigned int _9;
  418. long int _10;
  419. long unsigned int _11;
  420. long unsigned int _12;
  421. long unsigned int _13;
  422. int iftmp.1_20;
  423. int iftmp.1_34;
  424. int iftmp.1_35;
  425. EventBits_t _65;
  426. <bb 2> :
  427. pxEventBits_27 = xEventGroup_26(D);
  428. uxControlBits_28 = 0;
  429. xTimeoutOccurred_29 = 0;
  430. if (xEventGroup_26(D) == 0B)
  431. goto <bb 3>; [INV]
  432. else
  433. goto <bb 6>; [INV]
  434. <bb 3> :
  435. __asm__ __volatile__(" mov %0, %1
  436. msr basepri, %0
  437. isb
  438. dsb
  439. " : "=r" ulNewBASEPRI_66 : "i" 16 : "memory");
  440. <bb 4> :
  441. <bb 5> :
  442. goto <bb 5>; [INV]
  443. <bb 6> :
  444. _1 = uxBitsToWaitFor_30(D) & 4278190080;
  445. if (_1 != 0)
  446. goto <bb 7>; [INV]
  447. else
  448. goto <bb 10>; [INV]
  449. <bb 7> :
  450. __asm__ __volatile__(" mov %0, %1
  451. msr basepri, %0
  452. isb
  453. dsb
  454. " : "=r" ulNewBASEPRI_67 : "i" 16 : "memory");
  455. <bb 8> :
  456. <bb 9> :
  457. goto <bb 9>; [INV]
  458. <bb 10> :
  459. if (uxBitsToWaitFor_30(D) == 0)
  460. goto <bb 11>; [INV]
  461. else
  462. goto <bb 14>; [INV]
  463. <bb 11> :
  464. __asm__ __volatile__(" mov %0, %1
  465. msr basepri, %0
  466. isb
  467. dsb
  468. " : "=r" ulNewBASEPRI_68 : "i" 16 : "memory");
  469. <bb 12> :
  470. <bb 13> :
  471. goto <bb 13>; [INV]
  472. <bb 14> :
  473. _2 = xTaskGetSchedulerState ();
  474. if (_2 != 0)
  475. goto <bb 16>; [INV]
  476. else
  477. goto <bb 15>; [INV]
  478. <bb 15> :
  479. if (xTicksToWait_33(D) == 0)
  480. goto <bb 16>; [INV]
  481. else
  482. goto <bb 17>; [INV]
  483. <bb 16> :
  484. iftmp.1_35 = 1;
  485. goto <bb 18>; [INV]
  486. <bb 17> :
  487. iftmp.1_34 = 0;
  488. <bb 18> :
  489. # iftmp.1_20 = PHI <iftmp.1_35(16), iftmp.1_34(17)>
  490. if (iftmp.1_20 == 0)
  491. goto <bb 19>; [INV]
  492. else
  493. goto <bb 22>; [INV]
  494. <bb 19> :
  495. __asm__ __volatile__(" mov %0, %1
  496. msr basepri, %0
  497. isb
  498. dsb
  499. " : "=r" ulNewBASEPRI_69 : "i" 16 : "memory");
  500. <bb 20> :
  501. <bb 21> :
  502. goto <bb 21>; [INV]
  503. <bb 22> :
  504. vTaskSuspendAll ();
  505. uxCurrentEventBits_37 = pxEventBits_27->uxEventBits;
  506. xWaitConditionMet_40 = prvTestWaitCondition (uxCurrentEventBits_37, uxBitsToWaitFor_30(D), xWaitForAllBits_38(D));
  507. if (xWaitConditionMet_40 != 0)
  508. goto <bb 23>; [INV]
  509. else
  510. goto <bb 25>; [INV]
  511. <bb 23> :
  512. uxReturn_48 = uxCurrentEventBits_37;
  513. xTicksToWait_49 = 0;
  514. if (xClearOnExit_41(D) != 0)
  515. goto <bb 24>; [INV]
  516. else
  517. goto <bb 32>; [INV]
  518. <bb 24> :
  519. _3 = pxEventBits_27->uxEventBits;
  520. _4 = ~uxBitsToWaitFor_30(D);
  521. _5 = _3 & _4;
  522. pxEventBits_27->uxEventBits = _5;
  523. goto <bb 32>; [INV]
  524. <bb 25> :
  525. if (xTicksToWait_33(D) == 0)
  526. goto <bb 26>; [INV]
  527. else
  528. goto <bb 27>; [INV]
  529. <bb 26> :
  530. uxReturn_46 = uxCurrentEventBits_37;
  531. xTimeoutOccurred_47 = 1;
  532. goto <bb 32>; [INV]
  533. <bb 27> :
  534. if (xClearOnExit_41(D) != 0)
  535. goto <bb 28>; [INV]
  536. else
  537. goto <bb 29>; [INV]
  538. <bb 28> :
  539. uxControlBits_42 = uxControlBits_28 | 16777216;
  540. <bb 29> :
  541. # uxControlBits_18 = PHI <uxControlBits_28(27), uxControlBits_42(28)>
  542. if (xWaitForAllBits_38(D) != 0)
  543. goto <bb 30>; [INV]
  544. else
  545. goto <bb 31>; [INV]
  546. <bb 30> :
  547. uxControlBits_43 = uxControlBits_18 | 67108864;
  548. <bb 31> :
  549. # uxControlBits_19 = PHI <uxControlBits_18(29), uxControlBits_43(30)>
  550. _6 = &pxEventBits_27->xTasksWaitingForBits;
  551. _7 = uxBitsToWaitFor_30(D) | uxControlBits_19;
  552. vTaskPlaceOnUnorderedEventList (_6, _7, xTicksToWait_33(D));
  553. uxReturn_45 = 0;
  554. <bb 32> :
  555. # xTicksToWait_14 = PHI <xTicksToWait_49(24), xTicksToWait_33(D)(26), xTicksToWait_33(D)(31), xTicksToWait_49(23)>
  556. # uxReturn_15 = PHI <uxReturn_48(24), uxReturn_46(26), uxReturn_45(31), uxReturn_48(23)>
  557. xAlreadyYielded_52 = xTaskResumeAll ();
  558. if (xTicksToWait_14 != 0)
  559. goto <bb 33>; [INV]
  560. else
  561. goto <bb 41>; [INV]
  562. <bb 33> :
  563. if (xAlreadyYielded_52 == 0)
  564. goto <bb 34>; [INV]
  565. else
  566. goto <bb 35>; [INV]
  567. <bb 34> :
  568. _8 = 3758157060B;
  569. *_8 ={v} 268435456;
  570. __asm__ __volatile__("dsb" : : : "memory");
  571. __asm__ __volatile__("isb");
  572. <bb 35> :
  573. uxReturn_57 = uxTaskResetEventItemValue ();
  574. _9 = uxReturn_57 & 33554432;
  575. if (_9 == 0)
  576. goto <bb 36>; [INV]
  577. else
  578. goto <bb 40>; [INV]
  579. <bb 36> :
  580. vPortEnterCritical ();
  581. uxReturn_59 = pxEventBits_27->uxEventBits;
  582. _10 = prvTestWaitCondition (uxReturn_59, uxBitsToWaitFor_30(D), xWaitForAllBits_38(D));
  583. if (_10 != 0)
  584. goto <bb 37>; [INV]
  585. else
  586. goto <bb 39>; [INV]
  587. <bb 37> :
  588. if (xClearOnExit_41(D) != 0)
  589. goto <bb 38>; [INV]
  590. else
  591. goto <bb 39>; [INV]
  592. <bb 38> :
  593. _11 = pxEventBits_27->uxEventBits;
  594. _12 = ~uxBitsToWaitFor_30(D);
  595. _13 = _11 & _12;
  596. pxEventBits_27->uxEventBits = _13;
  597. <bb 39> :
  598. xTimeoutOccurred_62 = 1;
  599. vPortExitCritical ();
  600. <bb 40> :
  601. # uxReturn_16 = PHI <uxReturn_57(35), uxReturn_59(39)>
  602. uxReturn_64 = uxReturn_16 & 16777215;
  603. <bb 41> :
  604. # uxReturn_17 = PHI <uxReturn_15(32), uxReturn_64(40)>
  605. _65 = uxReturn_17;
  606. <bb 42> :
  607. <L45>:
  608. return _65;
  609. }
  610. xEventGroupSync (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait)
  611. {
  612. uint32_t ulNewBASEPRI;
  613. uint32_t ulNewBASEPRI;
  614. uint32_t ulNewBASEPRI;
  615. BaseType_t xTimeoutOccurred;
  616. BaseType_t xAlreadyYielded;
  617. struct EventGroup_t * pxEventBits;
  618. EventBits_t uxReturn;
  619. EventBits_t uxOriginalBitValue;
  620. EventBits_t D.6469;
  621. int iftmp.0;
  622. long unsigned int _1;
  623. long int _2;
  624. long unsigned int _3;
  625. long unsigned int _4;
  626. long unsigned int _5;
  627. long unsigned int _6;
  628. long unsigned int _7;
  629. struct List_t * _8;
  630. long unsigned int _9;
  631. volatile uint32_t * _10;
  632. long unsigned int _11;
  633. long unsigned int _12;
  634. long unsigned int _13;
  635. long unsigned int _14;
  636. long unsigned int _15;
  637. int iftmp.0_20;
  638. int iftmp.0_33;
  639. int iftmp.0_34;
  640. EventBits_t _59;
  641. <bb 2> :
  642. pxEventBits_27 = xEventGroup_26(D);
  643. xTimeoutOccurred_28 = 0;
  644. _1 = uxBitsToWaitFor_29(D) & 4278190080;
  645. if (_1 != 0)
  646. goto <bb 3>; [INV]
  647. else
  648. goto <bb 6>; [INV]
  649. <bb 3> :
  650. __asm__ __volatile__(" mov %0, %1
  651. msr basepri, %0
  652. isb
  653. dsb
  654. " : "=r" ulNewBASEPRI_60 : "i" 16 : "memory");
  655. <bb 4> :
  656. <bb 5> :
  657. goto <bb 5>; [INV]
  658. <bb 6> :
  659. if (uxBitsToWaitFor_29(D) == 0)
  660. goto <bb 7>; [INV]
  661. else
  662. goto <bb 10>; [INV]
  663. <bb 7> :
  664. __asm__ __volatile__(" mov %0, %1
  665. msr basepri, %0
  666. isb
  667. dsb
  668. " : "=r" ulNewBASEPRI_61 : "i" 16 : "memory");
  669. <bb 8> :
  670. <bb 9> :
  671. goto <bb 9>; [INV]
  672. <bb 10> :
  673. _2 = xTaskGetSchedulerState ();
  674. if (_2 != 0)
  675. goto <bb 12>; [INV]
  676. else
  677. goto <bb 11>; [INV]
  678. <bb 11> :
  679. if (xTicksToWait_32(D) == 0)
  680. goto <bb 12>; [INV]
  681. else
  682. goto <bb 13>; [INV]
  683. <bb 12> :
  684. iftmp.0_34 = 1;
  685. goto <bb 14>; [INV]
  686. <bb 13> :
  687. iftmp.0_33 = 0;
  688. <bb 14> :
  689. # iftmp.0_20 = PHI <iftmp.0_34(12), iftmp.0_33(13)>
  690. if (iftmp.0_20 == 0)
  691. goto <bb 15>; [INV]
  692. else
  693. goto <bb 18>; [INV]
  694. <bb 15> :
  695. __asm__ __volatile__(" mov %0, %1
  696. msr basepri, %0
  697. isb
  698. dsb
  699. " : "=r" ulNewBASEPRI_62 : "i" 16 : "memory");
  700. <bb 16> :
  701. <bb 17> :
  702. goto <bb 17>; [INV]
  703. <bb 18> :
  704. vTaskSuspendAll ();
  705. uxOriginalBitValue_36 = pxEventBits_27->uxEventBits;
  706. xEventGroupSetBits (xEventGroup_26(D), uxBitsToSet_37(D));
  707. _3 = uxOriginalBitValue_36 | uxBitsToSet_37(D);
  708. _4 = uxBitsToWaitFor_29(D) & _3;
  709. if (uxBitsToWaitFor_29(D) == _4)
  710. goto <bb 19>; [INV]
  711. else
  712. goto <bb 20>; [INV]
  713. <bb 19> :
  714. uxReturn_43 = uxOriginalBitValue_36 | uxBitsToSet_37(D);
  715. _5 = pxEventBits_27->uxEventBits;
  716. _6 = ~uxBitsToWaitFor_29(D);
  717. _7 = _5 & _6;
  718. pxEventBits_27->uxEventBits = _7;
  719. xTicksToWait_45 = 0;
  720. goto <bb 23>; [INV]
  721. <bb 20> :
  722. if (xTicksToWait_32(D) != 0)
  723. goto <bb 21>; [INV]
  724. else
  725. goto <bb 22>; [INV]
  726. <bb 21> :
  727. _8 = &pxEventBits_27->xTasksWaitingForBits;
  728. _9 = uxBitsToWaitFor_29(D) | 83886080;
  729. vTaskPlaceOnUnorderedEventList (_8, _9, xTicksToWait_32(D));
  730. uxReturn_42 = 0;
  731. goto <bb 23>; [INV]
  732. <bb 22> :
  733. uxReturn_39 = pxEventBits_27->uxEventBits;
  734. xTimeoutOccurred_40 = 1;
  735. <bb 23> :
  736. # xTicksToWait_16 = PHI <xTicksToWait_45(19), xTicksToWait_32(D)(21), xTicksToWait_32(D)(22)>
  737. # uxReturn_17 = PHI <uxReturn_43(19), uxReturn_42(21), uxReturn_39(22)>
  738. xAlreadyYielded_47 = xTaskResumeAll ();
  739. if (xTicksToWait_16 != 0)
  740. goto <bb 24>; [INV]
  741. else
  742. goto <bb 31>; [INV]
  743. <bb 24> :
  744. if (xAlreadyYielded_47 == 0)
  745. goto <bb 25>; [INV]
  746. else
  747. goto <bb 26>; [INV]
  748. <bb 25> :
  749. _10 = 3758157060B;
  750. *_10 ={v} 268435456;
  751. __asm__ __volatile__("dsb" : : : "memory");
  752. __asm__ __volatile__("isb");
  753. <bb 26> :
  754. uxReturn_52 = uxTaskResetEventItemValue ();
  755. _11 = uxReturn_52 & 33554432;
  756. if (_11 == 0)
  757. goto <bb 27>; [INV]
  758. else
  759. goto <bb 30>; [INV]
  760. <bb 27> :
  761. vPortEnterCritical ();
  762. uxReturn_54 = pxEventBits_27->uxEventBits;
  763. _12 = uxReturn_54 & uxBitsToWaitFor_29(D);
  764. if (uxBitsToWaitFor_29(D) == _12)
  765. goto <bb 28>; [INV]
  766. else
  767. goto <bb 29>; [INV]
  768. <bb 28> :
  769. _13 = pxEventBits_27->uxEventBits;
  770. _14 = ~uxBitsToWaitFor_29(D);
  771. _15 = _13 & _14;
  772. pxEventBits_27->uxEventBits = _15;
  773. <bb 29> :
  774. vPortExitCritical ();
  775. xTimeoutOccurred_57 = 1;
  776. <bb 30> :
  777. # uxReturn_18 = PHI <uxReturn_52(26), uxReturn_54(29)>
  778. uxReturn_58 = uxReturn_18 & 16777215;
  779. <bb 31> :
  780. # uxReturn_19 = PHI <uxReturn_17(23), uxReturn_58(30)>
  781. _59 = uxReturn_19;
  782. <bb 32> :
  783. <L30>:
  784. return _59;
  785. }
  786. xEventGroupCreate ()
  787. {
  788. struct EventGroup_t * pxEventBits;
  789. struct EventGroupDef_t * D.6439;
  790. struct List_t * _1;
  791. struct EventGroupDef_t * _8;
  792. <bb 2> :
  793. pxEventBits_5 = pvPortMalloc (28);
  794. if (pxEventBits_5 != 0B)
  795. goto <bb 3>; [INV]
  796. else
  797. goto <bb 4>; [INV]
  798. <bb 3> :
  799. pxEventBits_5->uxEventBits = 0;
  800. _1 = &pxEventBits_5->xTasksWaitingForBits;
  801. vListInitialise (_1);
  802. <bb 4> :
  803. _8 = pxEventBits_5;
  804. <bb 5> :
  805. <L3>:
  806. return _8;
  807. }