Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

xSemaphoreGiveFromISR return

Posted by incrediball on March 31, 2010
According to the documentation xSemaphoreGiveFromISR returns pdTRUE if the semaphore was successfully given, otherwise errQUEUE_FULL. What is the meaning of errQUEUE_FULL? Does it mean that the semaphore was already given?

It would be useful for debugging reasons to know if an interrupt is giving a semaphore without a task taking the semaphore. How can this be accomplished?

RE: xSemaphoreGiveFromISR return

Posted by Richard on April 1, 2010
Yes - semaphores are built on top of queues, so when you get the errQUEUE_FULL return value it means the semaphore cannot be given because it is already there. For example, if it is a binary semaphore, you can take the semaphore successfully, then give it successfully once. Once it is given the semaphore is effectively 'full'. If you attempt to give it again without first taking it again you will get this error code returned.

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS