Hi, On Friday 01 August 2008 05:39:27 Lucas Nealan wrote: > I was initially planning to implement ZTS, however the more I learned the > harder it became. The first issue being that not every scope implementing > the blocking macros has implemented or fetched TSRMLS data. Many places in > zend_alloc.c for example fail with the new macro's because of the missing > rsrc_id. Also, while this will eventually add some safer ZTS blocking > protection it will definitely come at a performance cost instead of the gain > we might see in non-zts mode. > I wasn't ready to jump in a start changing too > much of zend for this to be possible. Most of these are in zend_alloc.c and > zend_hash.c. > > In addition we'd need also need to figure out how manage signal delivery to > the right thread.
I worked a bit on the ZTS version, this actually fixes many problems with ZTS on non-windows plateforms :) For the delivery to the right thread, there will be no problem as long as the signal is sent to a specific thred (and not to the whole process). setitimer() for example will send the SIGALRM/SIGPROF signal to the calling thread, so the signal will be delivered to the thread which exceeded max_execution_time. For the ts resources however this effectively needs some TSRMLS_FETCH(). As _emalloc() and some others already use TSRMLS_FETCH() I guess it may be possible to just pass the TSRM arguments to those functions. I will send a modified version of your patch tomorrow. Regards, Arnaud -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php