Re: RFC: libc6 policy supplement 2nd try
Helmut Geyer <Helmut.Geyer@IWR.Uni-Heidelberg.De> writes:
> - compile the library using -D_RENTRANT or -D_THREAD_SAFE
There was some talk about adding -D_REENTRANT to the list of flags
that are automatically included by gcc/g++. I don't recall what the
resulting decision was, if there was one.
> - there may be no permanent data residing in the library memory that
> can be different for different threads.
> this means in the first place no static or global variables that
> are not in some way protected from access by a different threads.
> - all write access to files from a library must be both protected
> using some file locking mechanism in addition to using mutexes.
> - library functions must be protected from being used at the same
> time by two threads sharing the same memory space. This is done
> using mutexes.
In the general case, I'm not sure it's realistic to expect *all*
libraries to be rewritten thread safe (though it would be nice). At
the least, though, we should make certain that -D_REENTRANT is always
used, and that it's at least safe to call a given library function if
you make sure only one thread is in the library at a time. That
should be easier to accomplish.
> There will be a list available that lists all libraries part of
> Debian and their current status regarding compliance with these
> standard requirements. This list will be posted regularly to
> debian-devel by Helmut Geyer <Helmut.Geyer@iwr.uni-heidelberg.de>.
This is a good idea.
--
Rob
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: