Quality RTOS & Embedded Software

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




Loading

Getting a mutex is very slow

Posted by brianreinhold on June 24, 2017

It takes one second for the xSemaphoreTake() method to get an available mutex! It is so slow that is renders it useless. All I want is a mutex on a simple data queue. Why is it soooo slow?

thanks


Getting a mutex is very slow

Posted by richarddamon on June 24, 2017

It doesn't take that sort of time for me. Has someone given the Semaphore so it can be taken?


Getting a mutex is very slow

Posted by rtel on June 24, 2017

Obviously one second is orders of magnitude longer than it actually takes to obtain a semaphore, so I suspect your system is not doing what you think it is doing. Have you tried using FreeRTOS+Trace to visualise how your application executes?

Do you have two or more tasks at the same priority attempting to take the same mutex in tight loops? If so then the behaviour is described in the book.


[ 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