[PATCH, newlib] Allow locking routine to be retargeted
Fri Nov 11 11:54:00 GMT 2016
On Fri, 2016-11-11 at 11:09 +0000, Thomas Preudhomme wrote:
> Why do mutex needs to be more than a single integer? How big are
> mutex in RTOSÂ
> typically in your experience?
Well, mutexes or things like that may be just a "int" in Linux or other
"big" systems, where they are really just handles for data structures
managed by the kernel. In "small" embedded RTOSes these object usually
contain everything that is needed to implement the complete
functionality, especially the linked list of threads that are blocked
on this object.
In my RTOS mutex is 28 bytes.
In ChibiOS/RT mutex is 20 bytes.
In FreeRTOS mutx is a monster with size of at least 70 bytes (depending
on the config this can be a bit more).
(above number are valid for 32-bit architectures)
More information about the Newlib