cvs: TSRM / TSRM.c

From: Date: Thu, 15 Jul 2004 22:17:56 +0000
Subject: cvs: TSRM / TSRM.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2737@lists.php.net to get a copy of this message
helly Thu Jul 15 18:17:56 2004 EDT Modified files: /TSRM TSRM.c Log: Apply the fix http://cvs.php.net/diff.php/TSRM/TSRM.c?r1=1.61&r2=1.62&ty=u Index: TSRM/TSRM.c diff -u TSRM/TSRM.c:1.61 TSRM/TSRM.c:1.62 --- TSRM/TSRM.c:1.61 Sun May 23 12:05:09 2004 +++ TSRM/TSRM.c Thu Jul 15 18:17:55 2004 @@ -34,9 +34,7 @@ size_t size; ts_allocate_ctor ctor; ts_allocate_dtor dtor; -#ifdef MBO_0 int done; -#endif } tsrm_resource_type; @@ -162,11 +160,9 @@ next_p = p->next; for (j=0; j<p->count; j++) { if (p->storage[j]) { -#ifdef MBO_0 if (resource_types_table && !resource_types_table[j].done && resource_types_table[j].dtor) { resource_types_table[j].dtor(p->storage[j], &p->storage); } -#endif free(p->storage[j]); } } @@ -226,9 +222,7 @@ resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].size = size; resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].ctor = ctor; resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].dtor = dtor; -#ifdef MBO_0 resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].done = 0; -#endif /* enlarge the arrays for the already active threads */ for (i=0; i<tsrm_tls_table_size; i++) { @@ -283,11 +277,9 @@ tsrm_new_thread_begin_handler(thread_id, &((*thread_resources_ptr)->storage)); } for (i=0; i<id_count; i++) { -#if MBO_0 if (resource_types_table[i].done) { (*thread_resources_ptr)->storage[i] = NULL; } else -#endif { (*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size); if (resource_types_table[i].ctor) { @@ -437,7 +429,6 @@ /* deallocates all occurrences of a given id */ void ts_free_id(ts_rsrc_id id) { -#ifdef MBO_0 int i; int j = TSRM_UNSHUFFLE_RSRC_ID(id); @@ -466,7 +457,6 @@ tsrm_mutex_unlock(tsmm_mutex); TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully freed resource id %d", id)); -#endif }

« previous php.zend-engine.cvs (#2737) next »