Re: Code documentation

From: Date: Wed, 04 Apr 2001 10:43:27 +0000
Subject: Re: Code documentation
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-50823@lists.php.net to get a copy of this message
C>> I started noting about all the PLS_FETCH(), and ELS_FETCH() and C>> #ifdef ZTS and all that stuff but i really have a hard time C>> sometime debugging my patches cause i don't really know what that C>> function specifically does. now that i have new patches to do, i C>> wish i had a plain documentation. Well, there's some docs but they do not cover internals too much. If you have specific questions - ask them. ZTS means if PHP/Zend is built in threading environment (like for IIS) or not (like httpd). The difference is that in the former case memory space can be shared between number of execution threads, so special care should be taken. *_FETCH() "fetches" (i.e., makes available in current block) the set of per-thread globals for given module. These globals are defined in zend_globals.h for Zend and module headers for all modules. Generally, every global variable you modify should be per-thread global, unless you explicitly want it to be shared between threads - and then you should lock/mutex it, etc. In the non-ZTS mode most _FETCH functions are defined to do nothing, since using plain old globals is OK. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115

« previous php.dev (#50823) next »