thread-safe story



Hi...

I'm doing an PHP5 extension which will be (I hope) a persistent module for
Apache (win32)

In this extension, I have to manage a "pool" of variables (pointer list of
char * in fact) with a lot of functions like
add()/remove()/modify()
So I need to do that in a mult-thread way...

I've noticed that ZEND API proposes thread-safe way but it seems it works
only with variables.
Could I do things like

PHP_TEST_FUNCTION(.....)
{
.....
mutex_lock;
pool variables => add/mod/=remove element
mutex_unlock;
}

I didn't see that kind of stuff in the TSRM documentation (?)

May be should I use pthread instead of ZTS ?



thanx for your answers....







.