Quality RTOS & Embedded Software

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


Loading

Passing a pointer, how to know when done?

Posted by Juha Kuusama on April 28, 2010
Hi,

I want to pass relatively large block of data from many tasks task to one. It doesn't make sense to pass the data itself, but a pointer to it. Using the queue is obvious for passing the pointer, as several tasks can write to one queue. What would you consider a good method of signaling the sender that the receiving task is done with the data? Thank you for your insight!

Cheers,

Juha

RE: Passing a pointer, how to know when done?

Posted by Richard on April 28, 2010
This is really an application decision. I think there are lots of ways it could be done.

For example, it could be the receiving task that frees the memory so the sending task does not have to do anything. This is only a suitable solution if the memory is dynamically allocation and memory fragmentation is not an issue.

Alternatively the receiving task could somehow mark the memory (write to the first byte, clear the memory, set a different variable, etc.) once it is finished with it.

There are other options too, the receiver could signal the sender using a queue or semaphore, etc. The best option depends on your application.

Regards.


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


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

Xilinx Microblaze and Zynq partner