Hi! > Dmitry, the perf boost of this is awesome, but is it completely safe? > Won't a signal potentially overwrite a register variable here? Like on a > timeout, for example?
The docs say (http://gcc.gnu.org/onlinedocs/gcc/Global-Reg-Vars.html): It is not safe to access the global register variables from signal handlers, or from more than one thread of control, because the system library routines may temporarily use the register for other things (unless you recompile them specially for the task at hand). Also: It is not safe for one function that uses a global register variable to call another such function foo by way of a third function lose that is compiled without knowledge of this variable (i.e. in a different source file in which the variable isn't declared). This is because lose might save the register and put some other value there. For example, you can't expect a global register variable to be available in the comparison-function that you pass to qsort, since qsort might have put something else in that register. (If you are prepared to recompile qsort with the same global register variable, you can solve this problem.) So, I wonder how that would work with loadable modules and external libraries that could use PHP callbacks. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php