29.01.2015 Views

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

62 Chapter 5<br />

The second step (Figure 5-6) involves dynamic creation of child tasks in<br />

a parent task. Every par statement in the co<strong>de</strong> (Figure 5-6(a)) is refined to<br />

dynamically <strong>for</strong>k and join child tasks as part of the parent’s execution (Figure<br />

5-6(b)). The init methods of the children are called to create the child tasks.<br />

Then‚ par_start suspends the calling parent task in the RTOS layer be<strong>for</strong>e<br />

the children are actually executed in the par statement. After the two child<br />

tasks finish execution and the par exits‚ par_end resumes the execution of<br />

the parent task in the RTOS layer.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!