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 2016 Threads] Best way of storing state?Posted by harrywright88 on March 16, 2016 Hi, I'm using FreeRTOS to write code for a music system and need to be able to save several states simultaneously (boot status, play status, source selected etc). Normally I would do this by having a global struct which contains several enums for each state.
Is there a different/more appropriate way to accomplish saving states in FreeRTOS? I'm fairly new to the RTOS world, so excuse me if I've missed something obvious here.
Many thanks
Best way of storing state?Posted by rtel on March 16, 2016 I am an advocate of "the simplest way that works" - in this case the only reason not to continue to use the structure would be if multiple tasks need to write to the structure at the same time - in which case you would need to use some form of mutual exclusion primitive to ensure one task does not corrupt what another task is doing.
Best way of storing state?Posted by harrywright88 on March 17, 2016 thanks for your response, I'll probably implement it as before, but with mutual exclusion.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|