This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
RE: Reentrancy support for multiprocessor systems
- From: "Likely, Grant" <Grant dot Likely at gdcanada dot com>
- To: "Newlib mailing list (E-mail)" <newlib at sources dot redhat dot com>
- Date: Tue, 18 Mar 2003 13:19:09 -0700
- Subject: RE: Reentrancy support for multiprocessor systems
Okay, I've compiled the library with __DYNAMIC_REENT__ defined, but the
function __getreent() in libc/reent/getreent.c is still being compiled in
because there is no way to conditionally remove it. I'm going to patch it
out in my source tree as a work around, but I'm wondering if it should not
compiled in when __DYNAMIC_REENT__ is set.
Thanks,
g.
--> This is already done for you in libc/include/sys/reent.h. If you set
the
> __DYNAMIC_REENT__
> flag on while compiling newlib, then all references to _REENT will call a
> function __getreent(). You will need to supply a version of this function
> that
> can figure out which thread it is running under and pass back the
> appropriate
> reentrancy structure.