# portYIELD\_FROM\_ISR

**URL:** <https://forums.freertos.org/t/portyield-from-isr/1897>\
**Category:** Kernel\
**Created:** [February 18, 2009, 9:32am UTC](https://forums.freertos.org/t/portyield-from-isr/1897 "2009-02-18T09:32:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 18, 2009, 9:32am UTC](https://forums.freertos.org/t/portyield-from-isr/1897/1 "2009-02-18T09:32:25Z")

</div>

**[aviasaf](https://sourceforge.net/u/aviasaf/)** wrote on [Wednesday, February 18, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/52fdb116/#ccec):

hello all,

I am working on atmel at91sam7s256 base on IAR workbench 5.00.

the semaphore example which appears in FreeRtos Web site uses portYIELD\_FROM\_ISR macro,

its being called after xSemaphoreGiveFromISR and if xHigherPriorityTaskWoken was set to true.

first of all, I would like to understand, what is the Yield macro role ? is it uses in order to force a context switch after the interrupt routine is ended?

second, I didn’t found portYIELD\_FROM\_ISR macro at all, so I was trying to use “taskYIELD” but the OS was crashed.

what am I doing wrong?

does any one can help me with that problem?

thanks,&nbsp;

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 18, 2009, 9:41am UTC](https://forums.freertos.org/t/portyield-from-isr/1897/2 "2009-02-18T09:41:37Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Wednesday, February 18, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/52fdb116/#ccec/362f):

There is an example given under "interrupt service routines" on this page [http://www.freertos.org/portsam7iar.html](http://www.freertos.org/portsam7iar.html) and most likely in the demo for your port as well.
