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] [January 2009 Threads] Mutex required? Posted by Willem on January 25, 2009 When i have multiple tasks that reads out data from a variable, and only one task writes to a variable. Is it safer/better to use a mutex?
It is about a 32bit variable on a 32bit processor.
RE: Mutex required? Posted by MEdwards on January 25, 2009 One writer and multiple readers does not require a mutex, provided the write/read is atomic. A 32bit write on a 32bit processor should be atomic, so you are ok.
RE: Mutex required? Posted by Alain Mouette on January 26, 2009 Take care that on some architectures this cannot be taken for granted. As an example on a Cortex you can have a 32 bit variable that is not 32 bit aligned, extra aligment definition may be needed. fwik on ARM7 it is always aligned, someone please confirm this ;)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|