Re: [PHP4BETA] old thread safe stuff

From: Date: Tue, 27 Jul 1999 21:13:44 +0000
Subject: Re: [PHP4BETA] old thread safe stuff
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-2863@lists.php.net to get a copy of this message
Nope, it isn't. Still, I'd leave it intact for now, since the places where it mutexes are probably correct; We'd have to convert it to the new style of thread safety, but this code would give us good pointers... Zeev At 21:28 27/07/99 , Andrey Zmievski wrote:
This is taken from gd.c minit function: #if defined(THREAD_SAFE)
        gdlib_global_struct *gdlib_globals;
        PHP3_MUTEX_ALLOC(gdlib_mutex);
        PHP3_MUTEX_LOCK(gdlib_mutex);
        numthreads++;
        if (numthreads==1){
                if (!PHP3_TLS_PROC_STARTUP(GDlibTls)){
                        PHP3_MUTEX_UNLOCK(gdlib_mutex);
                        PHP3_MUTEX_FREE(gdlib_mutex);
                        return FAILURE;
                }
        }
        PHP3_MUTEX_UNLOCK(gdlib_mutex);
if(!PHP3_TLS_THREAD_INIT(GDlibTls,gdlib_globals,gdlib_global_struct)){
                PHP3_MUTEX_FREE(gdlib_mutex);
                return FAILURE;
        }
#endif Seems that this stuff is not necessary anymore, is it? -Andrey * Entropy isn't what it used to be. * -- PHP 4 Beta
-- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#2863) next »