FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2009 Threads] xSemaphoreGiveFromISR from context of a taskPosted by ARMinator on March 20, 2009 Hi,
Sorry if this post appears twice, my first attempt seems to have failed.
I need to write that piece of code that is generic enough that it allows giving a semaphore from the context of either an ISR or a task. Since an ISR must use xSemaphoreGiveFromISR to give semaphores, is it possible to use xSemaphoreGiveFromISR in the context of a task?
If so, any cons with doing this?
Jean
RE: xSemaphoreGiveFromISR from context of a tPosted by Richard on March 20, 2009 You can use xQueueGenericSendFromISR() from a task but need to take care of critical sections. The ISR version uses portSET_INTERRUPT_MASK_FROM_ISR() which is only defined for ports that use interrupt nesting. You would need to implement an equivalent for your port if it were not already defined.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|