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
Reentrancy safe C library (newlib)
Re: Reentrancy safe C library (newlib)
newlib does have synchronization definitions that you may need to provide (I think sys/lock.h). You can define the syscalls to be reentrant, look through reent.h
Re: Reentrancy safe C library (newlib)
I hear newlib has awful thread safety. Consider using a real libc.