Reentrancy safe C library (newlib)
Posted: Wed Jan 07, 2015 5:29 am
Hey guys
Christmas pause is over - happy new year to all of you!
Stuff works fine so far, I've been developing quite some stuff in userspace and it turned out to be a problem that the userspace C library isn't threadsafe by default (you don't say). So I wonder how to compile the C library in a way to make it reentrancy safe. By default newlib only requires some functions to be implemented that perform syscalls, but these stubs don't include anything like mutex calls, so how is this done? Is a libpthread implementation mandatory? Has one of you done this?
Thanks in advance
Greets,
Max
Christmas pause is over - happy new year to all of you!
Stuff works fine so far, I've been developing quite some stuff in userspace and it turned out to be a problem that the userspace C library isn't threadsafe by default (you don't say). So I wonder how to compile the C library in a way to make it reentrancy safe. By default newlib only requires some functions to be implemented that perform syscalls, but these stubs don't include anything like mutex calls, so how is this done? Is a libpthread implementation mandatory? Has one of you done this?
Thanks in advance
Greets,
Max