This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, newlib] Allow locking routine to be retargeted


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)

Regards,
FCh



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]