On Sat, 28 Jun 2003, Dmitri Dmitrienko wrote:
> > We could of course mutex every call to every external function. Then we
> > could be reasonably sure it would work, and at the same time we could be
> > sure that it was much slower than running it non-threaded.
>
> Any crash in an area protected by mutex would leave this mutex in
> non-released state and all the rest threads trying to access that area would
> be blocked forever.
A crash in a multi-threaded program most likely leads to the
termination of the process, so this is a non-issue.
> BTW, is there any way for checking if a library does not create nor use any
> global variables ? May be just running nm with non-stripped .so objects and
> inspecting the resulting list ? Any other ideas ?
nm displays global variables, including static function-scope
variables. However, you cannot discern whether their use is
save unless you audit the source code. The latter is also
necessary, because a function can rely on external
non-reentrant functions which renders the caller itself
non-reentrant.
- Sascha
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php