event_groups.c.017i.build_ssa_passes 20 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  1. vEventGroupSetNumber (void * xEventGroup, UBaseType_t uxEventGroupNumber)
  2. {
  3. <bb 2> :
  4. # DEBUG BEGIN_STMT
  5. MEM[(struct EventGroup_t *)xEventGroup].uxEventGroupNumber = uxEventGroupNumber;
  6. return;
  7. }
  8. uxEventGroupGetNumber (void * xEventGroup)
  9. {
  10. const struct EventGroup_t * pxEventBits;
  11. UBaseType_t xReturn;
  12. UBaseType_t D.6566;
  13. <bb 2> :
  14. # DEBUG BEGIN_STMT
  15. # DEBUG BEGIN_STMT
  16. pxEventBits = xEventGroup;
  17. # DEBUG BEGIN_STMT
  18. if (xEventGroup == 0B)
  19. goto <bb 3>; [INV]
  20. else
  21. goto <bb 4>; [INV]
  22. <bb 3> :
  23. # DEBUG BEGIN_STMT
  24. xReturn = 0;
  25. goto <bb 5>; [INV]
  26. <bb 4> :
  27. # DEBUG BEGIN_STMT
  28. xReturn = pxEventBits->uxEventGroupNumber;
  29. <bb 5> :
  30. # DEBUG BEGIN_STMT
  31. D.6566 = xReturn;
  32. return D.6566;
  33. }
  34. xEventGroupSetBitsFromISR (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet, BaseType_t * pxHigherPriorityTaskWoken)
  35. {
  36. BaseType_t xReturn;
  37. BaseType_t D.6561;
  38. <bb 2> :
  39. # DEBUG BEGIN_STMT
  40. # DEBUG BEGIN_STMT
  41. # DEBUG BEGIN_STMT
  42. xReturn = xTimerPendFunctionCallFromISR (vEventGroupSetBitsCallback, xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken);
  43. # DEBUG BEGIN_STMT
  44. D.6561 = xReturn;
  45. return D.6561;
  46. }
  47. prvTestWaitCondition (const EventBits_t uxCurrentEventBits, const EventBits_t uxBitsToWaitFor, const BaseType_t xWaitForAllBits)
  48. {
  49. BaseType_t xWaitConditionMet;
  50. BaseType_t D.6523;
  51. <bb 2> :
  52. # DEBUG BEGIN_STMT
  53. xWaitConditionMet = 0;
  54. # DEBUG BEGIN_STMT
  55. if (xWaitForAllBits == 0)
  56. goto <bb 3>; [INV]
  57. else
  58. goto <bb 5>; [INV]
  59. <bb 3> :
  60. # DEBUG BEGIN_STMT
  61. _1 = uxCurrentEventBits & uxBitsToWaitFor;
  62. if (_1 != 0)
  63. goto <bb 4>; [INV]
  64. else
  65. goto <bb 7>; [INV]
  66. <bb 4> :
  67. # DEBUG BEGIN_STMT
  68. xWaitConditionMet = 1;
  69. goto <bb 7>; [INV]
  70. <bb 5> :
  71. # DEBUG BEGIN_STMT
  72. _2 = uxCurrentEventBits & uxBitsToWaitFor;
  73. if (uxBitsToWaitFor == _2)
  74. goto <bb 6>; [INV]
  75. else
  76. goto <bb 7>; [INV]
  77. <bb 6> :
  78. # DEBUG BEGIN_STMT
  79. xWaitConditionMet = 1;
  80. <bb 7> :
  81. # DEBUG BEGIN_STMT
  82. # DEBUG BEGIN_STMT
  83. D.6523 = xWaitConditionMet;
  84. return D.6523;
  85. }
  86. vEventGroupClearBitsCallback (void * pvEventGroup, const uint32_t ulBitsToClear)
  87. {
  88. <bb 2> :
  89. # DEBUG BEGIN_STMT
  90. xEventGroupClearBits (pvEventGroup, ulBitsToClear);
  91. return;
  92. }
  93. vEventGroupSetBitsCallback (void * pvEventGroup, const uint32_t ulBitsToSet)
  94. {
  95. <bb 2> :
  96. # DEBUG BEGIN_STMT
  97. xEventGroupSetBits (pvEventGroup, ulBitsToSet);
  98. return;
  99. }
  100. vEventGroupDelete (struct EventGroupDef_t * xEventGroup)
  101. {
  102. const struct List_t * pxTasksWaitingForBits;
  103. struct EventGroup_t * pxEventBits;
  104. <bb 2> :
  105. # DEBUG BEGIN_STMT
  106. if (xEventGroup == 0B)
  107. goto <bb 3>; [INV]
  108. else
  109. goto <bb 5>; [INV]
  110. <bb 3> :
  111. # DEBUG BEGIN_STMT
  112. vPortRaiseBASEPRI ();
  113. <bb 4> :
  114. # DEBUG BEGIN_STMT
  115. # DEBUG BEGIN_STMT
  116. # DEBUG BEGIN_STMT
  117. goto <bb 4>; [INV]
  118. <bb 5> :
  119. # DEBUG BEGIN_STMT
  120. # DEBUG BEGIN_STMT
  121. pxEventBits = xEventGroup;
  122. # DEBUG BEGIN_STMT
  123. pxTasksWaitingForBits = &pxEventBits->xTasksWaitingForBits;
  124. # DEBUG BEGIN_STMT
  125. vTaskSuspendAll ();
  126. # DEBUG BEGIN_STMT
  127. # DEBUG BEGIN_STMT
  128. goto <bb 10>; [INV]
  129. <bb 6> :
  130. # DEBUG BEGIN_STMT
  131. _1 = pxTasksWaitingForBits->xListEnd.pxNext;
  132. _2 = &pxTasksWaitingForBits->xListEnd;
  133. if (_1 == _2)
  134. goto <bb 7>; [INV]
  135. else
  136. goto <bb 9>; [INV]
  137. <bb 7> :
  138. # DEBUG BEGIN_STMT
  139. vPortRaiseBASEPRI ();
  140. <bb 8> :
  141. # DEBUG BEGIN_STMT
  142. # DEBUG BEGIN_STMT
  143. # DEBUG BEGIN_STMT
  144. goto <bb 8>; [INV]
  145. <bb 9> :
  146. # DEBUG BEGIN_STMT
  147. # DEBUG BEGIN_STMT
  148. _3 = pxTasksWaitingForBits->xListEnd.pxNext;
  149. vTaskRemoveFromUnorderedEventList (_3, 33554432);
  150. <bb 10> :
  151. # DEBUG BEGIN_STMT
  152. _4 = pxTasksWaitingForBits->uxNumberOfItems;
  153. if (_4 != 0)
  154. goto <bb 6>; [INV]
  155. else
  156. goto <bb 11>; [INV]
  157. <bb 11> :
  158. # DEBUG BEGIN_STMT
  159. vPortFree (pxEventBits);
  160. # DEBUG BEGIN_STMT
  161. xTaskResumeAll ();
  162. return;
  163. }
  164. xEventGroupSetBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet)
  165. {
  166. BaseType_t xMatchFound;
  167. struct EventGroup_t * pxEventBits;
  168. EventBits_t uxControlBits;
  169. EventBits_t uxBitsWaitedFor;
  170. EventBits_t uxBitsToClear;
  171. const struct List_t * pxList;
  172. const struct ListItem_t * pxListEnd;
  173. struct ListItem_t * pxNext;
  174. struct ListItem_t * pxListItem;
  175. EventBits_t D.6555;
  176. <bb 2> :
  177. # DEBUG BEGIN_STMT
  178. # DEBUG BEGIN_STMT
  179. # DEBUG BEGIN_STMT
  180. # DEBUG BEGIN_STMT
  181. uxBitsToClear = 0;
  182. # DEBUG BEGIN_STMT
  183. pxEventBits = xEventGroup;
  184. # DEBUG BEGIN_STMT
  185. xMatchFound = 0;
  186. # DEBUG BEGIN_STMT
  187. if (xEventGroup == 0B)
  188. goto <bb 3>; [INV]
  189. else
  190. goto <bb 5>; [INV]
  191. <bb 3> :
  192. # DEBUG BEGIN_STMT
  193. vPortRaiseBASEPRI ();
  194. <bb 4> :
  195. # DEBUG BEGIN_STMT
  196. # DEBUG BEGIN_STMT
  197. # DEBUG BEGIN_STMT
  198. goto <bb 4>; [INV]
  199. <bb 5> :
  200. # DEBUG BEGIN_STMT
  201. # DEBUG BEGIN_STMT
  202. _1 = uxBitsToSet & 4278190080;
  203. if (_1 != 0)
  204. goto <bb 6>; [INV]
  205. else
  206. goto <bb 8>; [INV]
  207. <bb 6> :
  208. # DEBUG BEGIN_STMT
  209. vPortRaiseBASEPRI ();
  210. <bb 7> :
  211. # DEBUG BEGIN_STMT
  212. # DEBUG BEGIN_STMT
  213. # DEBUG BEGIN_STMT
  214. goto <bb 7>; [INV]
  215. <bb 8> :
  216. # DEBUG BEGIN_STMT
  217. # DEBUG BEGIN_STMT
  218. pxList = &pxEventBits->xTasksWaitingForBits;
  219. # DEBUG BEGIN_STMT
  220. pxListEnd = &pxList->xListEnd;
  221. # DEBUG BEGIN_STMT
  222. vTaskSuspendAll ();
  223. # DEBUG BEGIN_STMT
  224. # DEBUG BEGIN_STMT
  225. pxListItem = pxList->xListEnd.pxNext;
  226. # DEBUG BEGIN_STMT
  227. _2 = pxEventBits->uxEventBits;
  228. _3 = uxBitsToSet | _2;
  229. pxEventBits->uxEventBits = _3;
  230. # DEBUG BEGIN_STMT
  231. goto <bb 19>; [INV]
  232. <bb 9> :
  233. # DEBUG BEGIN_STMT
  234. pxNext = pxListItem->pxNext;
  235. # DEBUG BEGIN_STMT
  236. uxBitsWaitedFor = pxListItem->xItemValue;
  237. # DEBUG BEGIN_STMT
  238. xMatchFound = 0;
  239. # DEBUG BEGIN_STMT
  240. uxControlBits = uxBitsWaitedFor & 4278190080;
  241. # DEBUG BEGIN_STMT
  242. uxBitsWaitedFor = uxBitsWaitedFor & 16777215;
  243. # DEBUG BEGIN_STMT
  244. _4 = uxControlBits & 67108864;
  245. if (_4 == 0)
  246. goto <bb 10>; [INV]
  247. else
  248. goto <bb 12>; [INV]
  249. <bb 10> :
  250. # DEBUG BEGIN_STMT
  251. _5 = pxEventBits->uxEventBits;
  252. _6 = uxBitsWaitedFor & _5;
  253. if (_6 != 0)
  254. goto <bb 11>; [INV]
  255. else
  256. goto <bb 14>; [INV]
  257. <bb 11> :
  258. # DEBUG BEGIN_STMT
  259. xMatchFound = 1;
  260. goto <bb 14>; [INV]
  261. <bb 12> :
  262. # DEBUG BEGIN_STMT
  263. _7 = pxEventBits->uxEventBits;
  264. _8 = uxBitsWaitedFor & _7;
  265. if (uxBitsWaitedFor == _8)
  266. goto <bb 13>; [INV]
  267. else
  268. goto <bb 14>; [INV]
  269. <bb 13> :
  270. # DEBUG BEGIN_STMT
  271. xMatchFound = 1;
  272. <bb 14> :
  273. # DEBUG BEGIN_STMT
  274. # DEBUG BEGIN_STMT
  275. if (xMatchFound != 0)
  276. goto <bb 15>; [INV]
  277. else
  278. goto <bb 18>; [INV]
  279. <bb 15> :
  280. # DEBUG BEGIN_STMT
  281. _9 = uxControlBits & 16777216;
  282. if (_9 != 0)
  283. goto <bb 16>; [INV]
  284. else
  285. goto <bb 17>; [INV]
  286. <bb 16> :
  287. # DEBUG BEGIN_STMT
  288. uxBitsToClear = uxBitsToClear | uxBitsWaitedFor;
  289. <bb 17> :
  290. # DEBUG BEGIN_STMT
  291. # DEBUG BEGIN_STMT
  292. _10 = pxEventBits->uxEventBits;
  293. _11 = _10 | 33554432;
  294. vTaskRemoveFromUnorderedEventList (pxListItem, _11);
  295. <bb 18> :
  296. # DEBUG BEGIN_STMT
  297. pxListItem = pxNext;
  298. <bb 19> :
  299. # DEBUG BEGIN_STMT
  300. if (pxListItem != pxListEnd)
  301. goto <bb 9>; [INV]
  302. else
  303. goto <bb 20>; [INV]
  304. <bb 20> :
  305. # DEBUG BEGIN_STMT
  306. _12 = pxEventBits->uxEventBits;
  307. _13 = ~uxBitsToClear;
  308. _14 = _12 & _13;
  309. pxEventBits->uxEventBits = _14;
  310. # DEBUG BEGIN_STMT
  311. xTaskResumeAll ();
  312. # DEBUG BEGIN_STMT
  313. D.6555 = pxEventBits->uxEventBits;
  314. return D.6555;
  315. }
  316. xEventGroupGetBitsFromISR (struct EventGroupDef_t * xEventGroup)
  317. {
  318. EventBits_t uxReturn;
  319. const struct EventGroup_t * const pxEventBits;
  320. UBaseType_t uxSavedInterruptStatus;
  321. EventBits_t D.6533;
  322. <bb 2> :
  323. # DEBUG BEGIN_STMT
  324. # DEBUG BEGIN_STMT
  325. pxEventBits = xEventGroup;
  326. # DEBUG BEGIN_STMT
  327. # DEBUG BEGIN_STMT
  328. uxSavedInterruptStatus = ulPortRaiseBASEPRI ();
  329. # DEBUG BEGIN_STMT
  330. uxReturn = pxEventBits->uxEventBits;
  331. # DEBUG BEGIN_STMT
  332. vPortSetBASEPRI (uxSavedInterruptStatus);
  333. # DEBUG BEGIN_STMT
  334. D.6533 = uxReturn;
  335. return D.6533;
  336. }
  337. xEventGroupClearBitsFromISR (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToClear)
  338. {
  339. BaseType_t xReturn;
  340. BaseType_t D.6531;
  341. <bb 2> :
  342. # DEBUG BEGIN_STMT
  343. # DEBUG BEGIN_STMT
  344. # DEBUG BEGIN_STMT
  345. xReturn = xTimerPendFunctionCallFromISR (vEventGroupClearBitsCallback, xEventGroup, uxBitsToClear, 0B);
  346. # DEBUG BEGIN_STMT
  347. D.6531 = xReturn;
  348. return D.6531;
  349. }
  350. xEventGroupClearBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToClear)
  351. {
  352. EventBits_t uxReturn;
  353. struct EventGroup_t * pxEventBits;
  354. EventBits_t D.6529;
  355. <bb 2> :
  356. # DEBUG BEGIN_STMT
  357. pxEventBits = xEventGroup;
  358. # DEBUG BEGIN_STMT
  359. # DEBUG BEGIN_STMT
  360. if (xEventGroup == 0B)
  361. goto <bb 3>; [INV]
  362. else
  363. goto <bb 5>; [INV]
  364. <bb 3> :
  365. # DEBUG BEGIN_STMT
  366. vPortRaiseBASEPRI ();
  367. <bb 4> :
  368. # DEBUG BEGIN_STMT
  369. # DEBUG BEGIN_STMT
  370. # DEBUG BEGIN_STMT
  371. goto <bb 4>; [INV]
  372. <bb 5> :
  373. # DEBUG BEGIN_STMT
  374. # DEBUG BEGIN_STMT
  375. _1 = uxBitsToClear & 4278190080;
  376. if (_1 != 0)
  377. goto <bb 6>; [INV]
  378. else
  379. goto <bb 8>; [INV]
  380. <bb 6> :
  381. # DEBUG BEGIN_STMT
  382. vPortRaiseBASEPRI ();
  383. <bb 7> :
  384. # DEBUG BEGIN_STMT
  385. # DEBUG BEGIN_STMT
  386. # DEBUG BEGIN_STMT
  387. goto <bb 7>; [INV]
  388. <bb 8> :
  389. # DEBUG BEGIN_STMT
  390. # DEBUG BEGIN_STMT
  391. vPortEnterCritical ();
  392. # DEBUG BEGIN_STMT
  393. # DEBUG BEGIN_STMT
  394. uxReturn = pxEventBits->uxEventBits;
  395. # DEBUG BEGIN_STMT
  396. _2 = pxEventBits->uxEventBits;
  397. _3 = ~uxBitsToClear;
  398. _4 = _2 & _3;
  399. pxEventBits->uxEventBits = _4;
  400. # DEBUG BEGIN_STMT
  401. vPortExitCritical ();
  402. # DEBUG BEGIN_STMT
  403. D.6529 = uxReturn;
  404. return D.6529;
  405. }
  406. xEventGroupWaitBits (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait)
  407. {
  408. const EventBits_t uxCurrentEventBits;
  409. BaseType_t xTimeoutOccurred;
  410. BaseType_t xAlreadyYielded;
  411. BaseType_t xWaitConditionMet;
  412. EventBits_t uxControlBits;
  413. EventBits_t uxReturn;
  414. struct EventGroup_t * pxEventBits;
  415. EventBits_t D.6512;
  416. int iftmp.1;
  417. <bb 2> :
  418. # DEBUG BEGIN_STMT
  419. pxEventBits = xEventGroup;
  420. # DEBUG BEGIN_STMT
  421. uxControlBits = 0;
  422. # DEBUG BEGIN_STMT
  423. # DEBUG BEGIN_STMT
  424. xTimeoutOccurred = 0;
  425. # DEBUG BEGIN_STMT
  426. if (xEventGroup == 0B)
  427. goto <bb 3>; [INV]
  428. else
  429. goto <bb 5>; [INV]
  430. <bb 3> :
  431. # DEBUG BEGIN_STMT
  432. vPortRaiseBASEPRI ();
  433. <bb 4> :
  434. # DEBUG BEGIN_STMT
  435. # DEBUG BEGIN_STMT
  436. # DEBUG BEGIN_STMT
  437. goto <bb 4>; [INV]
  438. <bb 5> :
  439. # DEBUG BEGIN_STMT
  440. # DEBUG BEGIN_STMT
  441. _1 = uxBitsToWaitFor & 4278190080;
  442. if (_1 != 0)
  443. goto <bb 6>; [INV]
  444. else
  445. goto <bb 8>; [INV]
  446. <bb 6> :
  447. # DEBUG BEGIN_STMT
  448. vPortRaiseBASEPRI ();
  449. <bb 7> :
  450. # DEBUG BEGIN_STMT
  451. # DEBUG BEGIN_STMT
  452. # DEBUG BEGIN_STMT
  453. goto <bb 7>; [INV]
  454. <bb 8> :
  455. # DEBUG BEGIN_STMT
  456. # DEBUG BEGIN_STMT
  457. if (uxBitsToWaitFor == 0)
  458. goto <bb 9>; [INV]
  459. else
  460. goto <bb 11>; [INV]
  461. <bb 9> :
  462. # DEBUG BEGIN_STMT
  463. vPortRaiseBASEPRI ();
  464. <bb 10> :
  465. # DEBUG BEGIN_STMT
  466. # DEBUG BEGIN_STMT
  467. # DEBUG BEGIN_STMT
  468. goto <bb 10>; [INV]
  469. <bb 11> :
  470. # DEBUG BEGIN_STMT
  471. # DEBUG BEGIN_STMT
  472. _2 = xTaskGetSchedulerState ();
  473. if (_2 != 0)
  474. goto <bb 13>; [INV]
  475. else
  476. goto <bb 12>; [INV]
  477. <bb 12> :
  478. if (xTicksToWait == 0)
  479. goto <bb 13>; [INV]
  480. else
  481. goto <bb 14>; [INV]
  482. <bb 13> :
  483. iftmp.1 = 1;
  484. goto <bb 15>; [INV]
  485. <bb 14> :
  486. iftmp.1 = 0;
  487. <bb 15> :
  488. if (iftmp.1 == 0)
  489. goto <bb 16>; [INV]
  490. else
  491. goto <bb 18>; [INV]
  492. <bb 16> :
  493. # DEBUG BEGIN_STMT
  494. vPortRaiseBASEPRI ();
  495. <bb 17> :
  496. # DEBUG BEGIN_STMT
  497. # DEBUG BEGIN_STMT
  498. # DEBUG BEGIN_STMT
  499. goto <bb 17>; [INV]
  500. <bb 18> :
  501. # DEBUG BEGIN_STMT
  502. # DEBUG BEGIN_STMT
  503. vTaskSuspendAll ();
  504. # DEBUG BEGIN_STMT
  505. uxCurrentEventBits = pxEventBits->uxEventBits;
  506. # DEBUG BEGIN_STMT
  507. xWaitConditionMet = prvTestWaitCondition (uxCurrentEventBits, uxBitsToWaitFor, xWaitForAllBits);
  508. # DEBUG BEGIN_STMT
  509. if (xWaitConditionMet != 0)
  510. goto <bb 19>; [INV]
  511. else
  512. goto <bb 21>; [INV]
  513. <bb 19> :
  514. # DEBUG BEGIN_STMT
  515. uxReturn = uxCurrentEventBits;
  516. # DEBUG BEGIN_STMT
  517. xTicksToWait = 0;
  518. # DEBUG BEGIN_STMT
  519. if (xClearOnExit != 0)
  520. goto <bb 20>; [INV]
  521. else
  522. goto <bb 28>; [INV]
  523. <bb 20> :
  524. # DEBUG BEGIN_STMT
  525. _3 = pxEventBits->uxEventBits;
  526. _4 = ~uxBitsToWaitFor;
  527. _5 = _3 & _4;
  528. pxEventBits->uxEventBits = _5;
  529. goto <bb 28>; [INV]
  530. <bb 21> :
  531. # DEBUG BEGIN_STMT
  532. if (xTicksToWait == 0)
  533. goto <bb 22>; [INV]
  534. else
  535. goto <bb 23>; [INV]
  536. <bb 22> :
  537. # DEBUG BEGIN_STMT
  538. uxReturn = uxCurrentEventBits;
  539. # DEBUG BEGIN_STMT
  540. xTimeoutOccurred = 1;
  541. goto <bb 28>; [INV]
  542. <bb 23> :
  543. # DEBUG BEGIN_STMT
  544. if (xClearOnExit != 0)
  545. goto <bb 24>; [INV]
  546. else
  547. goto <bb 25>; [INV]
  548. <bb 24> :
  549. # DEBUG BEGIN_STMT
  550. uxControlBits = uxControlBits | 16777216;
  551. <bb 25> :
  552. # DEBUG BEGIN_STMT
  553. # DEBUG BEGIN_STMT
  554. if (xWaitForAllBits != 0)
  555. goto <bb 26>; [INV]
  556. else
  557. goto <bb 27>; [INV]
  558. <bb 26> :
  559. # DEBUG BEGIN_STMT
  560. uxControlBits = uxControlBits | 67108864;
  561. <bb 27> :
  562. # DEBUG BEGIN_STMT
  563. # DEBUG BEGIN_STMT
  564. _6 = &pxEventBits->xTasksWaitingForBits;
  565. _7 = uxBitsToWaitFor | uxControlBits;
  566. vTaskPlaceOnUnorderedEventList (_6, _7, xTicksToWait);
  567. # DEBUG BEGIN_STMT
  568. uxReturn = 0;
  569. <bb 28> :
  570. # DEBUG BEGIN_STMT
  571. # DEBUG BEGIN_STMT
  572. xAlreadyYielded = xTaskResumeAll ();
  573. # DEBUG BEGIN_STMT
  574. if (xTicksToWait != 0)
  575. goto <bb 29>; [INV]
  576. else
  577. goto <bb 37>; [INV]
  578. <bb 29> :
  579. # DEBUG BEGIN_STMT
  580. if (xAlreadyYielded == 0)
  581. goto <bb 30>; [INV]
  582. else
  583. goto <bb 31>; [INV]
  584. <bb 30> :
  585. # DEBUG BEGIN_STMT
  586. _8 = 3758157060B;
  587. *_8 = 268435456;
  588. # DEBUG BEGIN_STMT
  589. __asm__ __volatile__("dsb" : : : "memory");
  590. # DEBUG BEGIN_STMT
  591. __asm__ __volatile__("isb");
  592. # DEBUG BEGIN_STMT
  593. <bb 31> :
  594. # DEBUG BEGIN_STMT
  595. # DEBUG BEGIN_STMT
  596. uxReturn = uxTaskResetEventItemValue ();
  597. # DEBUG BEGIN_STMT
  598. _9 = uxReturn & 33554432;
  599. if (_9 == 0)
  600. goto <bb 32>; [INV]
  601. else
  602. goto <bb 36>; [INV]
  603. <bb 32> :
  604. # DEBUG BEGIN_STMT
  605. vPortEnterCritical ();
  606. # DEBUG BEGIN_STMT
  607. uxReturn = pxEventBits->uxEventBits;
  608. # DEBUG BEGIN_STMT
  609. _10 = prvTestWaitCondition (uxReturn, uxBitsToWaitFor, xWaitForAllBits);
  610. if (_10 != 0)
  611. goto <bb 33>; [INV]
  612. else
  613. goto <bb 35>; [INV]
  614. <bb 33> :
  615. # DEBUG BEGIN_STMT
  616. if (xClearOnExit != 0)
  617. goto <bb 34>; [INV]
  618. else
  619. goto <bb 35>; [INV]
  620. <bb 34> :
  621. # DEBUG BEGIN_STMT
  622. _11 = pxEventBits->uxEventBits;
  623. _12 = ~uxBitsToWaitFor;
  624. _13 = _11 & _12;
  625. pxEventBits->uxEventBits = _13;
  626. <bb 35> :
  627. # DEBUG BEGIN_STMT
  628. # DEBUG BEGIN_STMT
  629. xTimeoutOccurred = 1;
  630. # DEBUG BEGIN_STMT
  631. vPortExitCritical ();
  632. <bb 36> :
  633. # DEBUG BEGIN_STMT
  634. # DEBUG BEGIN_STMT
  635. uxReturn = uxReturn & 16777215;
  636. <bb 37> :
  637. # DEBUG BEGIN_STMT
  638. # DEBUG BEGIN_STMT
  639. # DEBUG BEGIN_STMT
  640. D.6512 = uxReturn;
  641. return D.6512;
  642. }
  643. xEventGroupSync (struct EventGroupDef_t * xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait)
  644. {
  645. BaseType_t xTimeoutOccurred;
  646. BaseType_t xAlreadyYielded;
  647. struct EventGroup_t * pxEventBits;
  648. EventBits_t uxReturn;
  649. EventBits_t uxOriginalBitValue;
  650. EventBits_t D.6468;
  651. int iftmp.0;
  652. <bb 2> :
  653. # DEBUG BEGIN_STMT
  654. # DEBUG BEGIN_STMT
  655. pxEventBits = xEventGroup;
  656. # DEBUG BEGIN_STMT
  657. # DEBUG BEGIN_STMT
  658. xTimeoutOccurred = 0;
  659. # DEBUG BEGIN_STMT
  660. _1 = uxBitsToWaitFor & 4278190080;
  661. if (_1 != 0)
  662. goto <bb 3>; [INV]
  663. else
  664. goto <bb 5>; [INV]
  665. <bb 3> :
  666. # DEBUG BEGIN_STMT
  667. vPortRaiseBASEPRI ();
  668. <bb 4> :
  669. # DEBUG BEGIN_STMT
  670. # DEBUG BEGIN_STMT
  671. # DEBUG BEGIN_STMT
  672. goto <bb 4>; [INV]
  673. <bb 5> :
  674. # DEBUG BEGIN_STMT
  675. # DEBUG BEGIN_STMT
  676. if (uxBitsToWaitFor == 0)
  677. goto <bb 6>; [INV]
  678. else
  679. goto <bb 8>; [INV]
  680. <bb 6> :
  681. # DEBUG BEGIN_STMT
  682. vPortRaiseBASEPRI ();
  683. <bb 7> :
  684. # DEBUG BEGIN_STMT
  685. # DEBUG BEGIN_STMT
  686. # DEBUG BEGIN_STMT
  687. goto <bb 7>; [INV]
  688. <bb 8> :
  689. # DEBUG BEGIN_STMT
  690. # DEBUG BEGIN_STMT
  691. _2 = xTaskGetSchedulerState ();
  692. if (_2 != 0)
  693. goto <bb 10>; [INV]
  694. else
  695. goto <bb 9>; [INV]
  696. <bb 9> :
  697. if (xTicksToWait == 0)
  698. goto <bb 10>; [INV]
  699. else
  700. goto <bb 11>; [INV]
  701. <bb 10> :
  702. iftmp.0 = 1;
  703. goto <bb 12>; [INV]
  704. <bb 11> :
  705. iftmp.0 = 0;
  706. <bb 12> :
  707. if (iftmp.0 == 0)
  708. goto <bb 13>; [INV]
  709. else
  710. goto <bb 15>; [INV]
  711. <bb 13> :
  712. # DEBUG BEGIN_STMT
  713. vPortRaiseBASEPRI ();
  714. <bb 14> :
  715. # DEBUG BEGIN_STMT
  716. # DEBUG BEGIN_STMT
  717. # DEBUG BEGIN_STMT
  718. goto <bb 14>; [INV]
  719. <bb 15> :
  720. # DEBUG BEGIN_STMT
  721. # DEBUG BEGIN_STMT
  722. vTaskSuspendAll ();
  723. # DEBUG BEGIN_STMT
  724. uxOriginalBitValue = pxEventBits->uxEventBits;
  725. # DEBUG BEGIN_STMT
  726. xEventGroupSetBits (xEventGroup, uxBitsToSet);
  727. # DEBUG BEGIN_STMT
  728. _3 = uxOriginalBitValue | uxBitsToSet;
  729. _4 = uxBitsToWaitFor & _3;
  730. if (uxBitsToWaitFor == _4)
  731. goto <bb 16>; [INV]
  732. else
  733. goto <bb 17>; [INV]
  734. <bb 16> :
  735. # DEBUG BEGIN_STMT
  736. uxReturn = uxOriginalBitValue | uxBitsToSet;
  737. # DEBUG BEGIN_STMT
  738. _5 = pxEventBits->uxEventBits;
  739. _6 = ~uxBitsToWaitFor;
  740. _7 = _5 & _6;
  741. pxEventBits->uxEventBits = _7;
  742. # DEBUG BEGIN_STMT
  743. xTicksToWait = 0;
  744. goto <bb 20>; [INV]
  745. <bb 17> :
  746. # DEBUG BEGIN_STMT
  747. if (xTicksToWait != 0)
  748. goto <bb 18>; [INV]
  749. else
  750. goto <bb 19>; [INV]
  751. <bb 18> :
  752. # DEBUG BEGIN_STMT
  753. # DEBUG BEGIN_STMT
  754. _8 = &pxEventBits->xTasksWaitingForBits;
  755. _9 = uxBitsToWaitFor | 83886080;
  756. vTaskPlaceOnUnorderedEventList (_8, _9, xTicksToWait);
  757. # DEBUG BEGIN_STMT
  758. uxReturn = 0;
  759. goto <bb 20>; [INV]
  760. <bb 19> :
  761. # DEBUG BEGIN_STMT
  762. uxReturn = pxEventBits->uxEventBits;
  763. # DEBUG BEGIN_STMT
  764. xTimeoutOccurred = 1;
  765. <bb 20> :
  766. # DEBUG BEGIN_STMT
  767. xAlreadyYielded = xTaskResumeAll ();
  768. # DEBUG BEGIN_STMT
  769. if (xTicksToWait != 0)
  770. goto <bb 21>; [INV]
  771. else
  772. goto <bb 28>; [INV]
  773. <bb 21> :
  774. # DEBUG BEGIN_STMT
  775. if (xAlreadyYielded == 0)
  776. goto <bb 22>; [INV]
  777. else
  778. goto <bb 23>; [INV]
  779. <bb 22> :
  780. # DEBUG BEGIN_STMT
  781. _10 = 3758157060B;
  782. *_10 = 268435456;
  783. # DEBUG BEGIN_STMT
  784. __asm__ __volatile__("dsb" : : : "memory");
  785. # DEBUG BEGIN_STMT
  786. __asm__ __volatile__("isb");
  787. # DEBUG BEGIN_STMT
  788. <bb 23> :
  789. # DEBUG BEGIN_STMT
  790. # DEBUG BEGIN_STMT
  791. uxReturn = uxTaskResetEventItemValue ();
  792. # DEBUG BEGIN_STMT
  793. _11 = uxReturn & 33554432;
  794. if (_11 == 0)
  795. goto <bb 24>; [INV]
  796. else
  797. goto <bb 27>; [INV]
  798. <bb 24> :
  799. # DEBUG BEGIN_STMT
  800. vPortEnterCritical ();
  801. # DEBUG BEGIN_STMT
  802. uxReturn = pxEventBits->uxEventBits;
  803. # DEBUG BEGIN_STMT
  804. _12 = uxReturn & uxBitsToWaitFor;
  805. if (uxBitsToWaitFor == _12)
  806. goto <bb 25>; [INV]
  807. else
  808. goto <bb 26>; [INV]
  809. <bb 25> :
  810. # DEBUG BEGIN_STMT
  811. _13 = pxEventBits->uxEventBits;
  812. _14 = ~uxBitsToWaitFor;
  813. _15 = _13 & _14;
  814. pxEventBits->uxEventBits = _15;
  815. <bb 26> :
  816. # DEBUG BEGIN_STMT
  817. # DEBUG BEGIN_STMT
  818. vPortExitCritical ();
  819. # DEBUG BEGIN_STMT
  820. xTimeoutOccurred = 1;
  821. <bb 27> :
  822. # DEBUG BEGIN_STMT
  823. # DEBUG BEGIN_STMT
  824. uxReturn = uxReturn & 16777215;
  825. <bb 28> :
  826. # DEBUG BEGIN_STMT
  827. # DEBUG BEGIN_STMT
  828. # DEBUG BEGIN_STMT
  829. D.6468 = uxReturn;
  830. return D.6468;
  831. }
  832. xEventGroupCreate ()
  833. {
  834. struct EventGroup_t * pxEventBits;
  835. struct EventGroupDef_t * D.6438;
  836. <bb 2> :
  837. # DEBUG BEGIN_STMT
  838. # DEBUG BEGIN_STMT
  839. pxEventBits = pvPortMalloc (28);
  840. # DEBUG BEGIN_STMT
  841. if (pxEventBits != 0B)
  842. goto <bb 3>; [INV]
  843. else
  844. goto <bb 4>; [INV]
  845. <bb 3> :
  846. # DEBUG BEGIN_STMT
  847. pxEventBits->uxEventBits = 0;
  848. # DEBUG BEGIN_STMT
  849. _1 = &pxEventBits->xTasksWaitingForBits;
  850. vListInitialise (_1);
  851. # DEBUG BEGIN_STMT
  852. <bb 4> :
  853. # DEBUG BEGIN_STMT
  854. # DEBUG BEGIN_STMT
  855. D.6438 = pxEventBits;
  856. return D.6438;
  857. }
  858. __attribute__((always_inline))
  859. vPortSetBASEPRI (uint32_t ulNewMaskValue)
  860. {
  861. <bb 2> :
  862. # DEBUG BEGIN_STMT
  863. __asm__ __volatile__(" msr basepri, %0 " : : "r" ulNewMaskValue : "memory");
  864. return;
  865. }
  866. __attribute__((always_inline))
  867. ulPortRaiseBASEPRI ()
  868. {
  869. uint32_t ulNewBASEPRI;
  870. uint32_t ulOriginalBASEPRI;
  871. uint32_t D.6535;
  872. <bb 2> :
  873. # DEBUG BEGIN_STMT
  874. # DEBUG BEGIN_STMT
  875. __asm__ __volatile__(" mrs %0, basepri
  876. mov %1, %2
  877. msr basepri, %1
  878. isb
  879. dsb
  880. " : "=r" ulOriginalBASEPRI, "=r" ulNewBASEPRI : "i" 16 : "memory");
  881. # DEBUG BEGIN_STMT
  882. D.6535 = ulOriginalBASEPRI;
  883. return D.6535;
  884. }
  885. __attribute__((always_inline))
  886. vPortRaiseBASEPRI ()
  887. {
  888. uint32_t ulNewBASEPRI;
  889. <bb 2> :
  890. # DEBUG BEGIN_STMT
  891. # DEBUG BEGIN_STMT
  892. __asm__ __volatile__(" mov %0, %1
  893. msr basepri, %0
  894. isb
  895. dsb
  896. " : "=r" ulNewBASEPRI : "i" 16 : "memory");
  897. return;
  898. }