1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00
Commit Graph

665 Commits

Author SHA1 Message Date
Anatol Belski d11734b4b0 reworked the patch, less new stuff but worky
TLS is already used in TSRM, the way exporting the tsrm cache through
a thread local variable is not portable. Additionally, the current
patch suffers from bugs which are hard to find, but prevent it to
be worky with apache. What is done here is mainly uses the idea
from the RFC patch, but

- __thread variable is removed
- offset math and declarations are removed
- extra macros and definitions are removed

What is done merely is

- use an inline function to access the tsrm cache. The function uses
  the portable tsrm_tls_get macro which is cheap
- all the TSRM_* macros are set to placebo. Thus this opens the way
  remove them later

Except that, the logic is old. TSRMLS_FETCH will have to be done once
per thread, then tsrm_get_ls_cache() can be used. Things seeming to be
worky are cli, cli server and apache. I also tried to enable bz2
shared and it has worked out of the box. The change is yet minimal
diffing to the current master bus is a worky start, IMHO. Though will
have to recheck the other previously done SAPIs - embed and cgi.

The offsets can be added to the tsrm_resource_type struct, then
it'll not be needed to declare them in the userspace. Even the
"done" member type can be changed to int16 or smaller, then adding
the offset as int16 will not change the struct size. As well on the
todo might be removing the hashed storage, thread_id != thread_id and
linked list logic in favour of the explicit TLS operations.
2014-09-25 18:48:27 +02:00
krakjoe 6a5c006827 correct macro 2014-09-23 12:46:16 +01:00
Anatol Belski fb17d6516d Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fixed copying of the struct as it's not being modified
  avoid strlen usage in loop
  Removes accidentally added files.
  Reverts some unwanted changes
  Deletes patch leftovers
  Replaces php5 with php7, without whitespace changes.
2014-09-20 21:37:19 +02:00
krakjoe b3aebda9ea native tls initial patch 2014-09-20 20:22:14 +01:00
Florian MARGAINE 8eb7e7bf7f Merge branch 'master' into issue-67910
Conflicts:
	README.PARAMETER_PARSING_API
	ext/gmp/tests/001.phpt
2014-09-20 10:09:21 +02:00
Florian MARGAINE cf0303e782 Replaces php5 with php7, without whitespace changes. 2014-09-20 10:01:44 +02:00
Johannes Schlüter d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski 5cf17fc8bf reduce struct size by 8 byte on 64 bit 2014-09-14 22:31:01 +02:00
Anatol Belski b75a058810 fix ftell/fseek calls 2014-09-14 22:28:42 +02:00
Anatol Belski 69d6e093e9 Merge branch 'PHP-5.6'
* PHP-5.6:
  fixed the cast and incompatible pointer warning

Conflicts:
	sapi/cgi/fastcgi.c
2014-09-12 14:37:54 +02:00
Anatol Belski bcdbd47117 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fixed the cast and incompatible pointer warning
2014-09-12 14:36:54 +02:00
Anatol Belski fdfc31a4f7 fixed the cast and incompatible pointer warning 2014-09-12 14:36:00 +02:00
Dmitry Stogov 6561d03a41 Added ability to make a number of "warmup" requests before an actual benchmark.
(php-cgi -T [<number-of-warmup-requests>,]<number-of-benchmark-requests> <file>)
2014-09-08 16:24:46 +04:00
Xinchen Hui 4a12b4cef9 closesocket is defined in php_network.h 2014-08-28 13:20:43 +08:00
Xinchen Hui 7a90e40af7 closesocket is already defined in main/php_network.h 2014-08-28 13:18:55 +08:00
Anatol Belski 202e8db1dc fixed several long vs zend_long casts 2014-08-26 11:26:53 +02:00
Nikita Popov 59848e3fbb Remove ZEND_ACC_INTERACTIVE and CG(interactive)
As far as I can discern these are leftovers of the interactive
shell implementation that was used before PHP 5.4. Now the readline
ext makes use of normal eval calls for this.

So, dropping these until there is evidence to the contrary, as they
currently wouldn't work anyway.
2014-08-25 23:46:43 +02:00
Anatol Belski 4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski 21f623e945 ported fcgi 2014-08-19 23:12:17 +02:00
Anatol Belski 63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Anatol Belski 54906c760f increase the stack size for cli and cgi 2014-08-16 16:45:05 +02:00
Dmitry Stogov c1c913c5f1 cleanup (we don't have to duplicate elements of module_registry) 2014-08-13 17:05:18 +04:00
Xinchen Hui 110bf9c720 Merge remote-tracking branch 'origin/master' into phpng
Conflicts:
	Zend/zend_compile.h
	ext/openssl/xp_ssl.c
2014-07-18 16:25:43 +08:00
Rasmus Lerdorf 3b08082600 This test depends on expose_php being on 2014-07-14 08:22:05 -07:00
Rasmus Lerdorf 935bc5795f This test depends on expose_php being on 2014-07-14 08:21:57 -07:00
Rasmus Lerdorf 40955e27f7 This test depends on expose_php being on 2014-07-14 08:21:27 -07:00
Xinchen Hui c2082ece52 Fixed apply_func_t (they should be broken before) 2014-05-25 18:32:35 +08:00
Pierre Joye 47335ef956 fix casting 2014-05-15 20:30:30 +02:00
Xinchen Hui c242518bf0 There should been memory leaks(and don't use pointer cast) 2014-05-08 15:20:13 +08:00
Nikita Popov 257bf697ae Fix php-cgi -m 2014-05-01 00:25:23 +02:00
Dmitry Stogov f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Dmitry Stogov 72c287bd23 Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word 2014-04-21 18:25:34 +04:00
Dmitry Stogov 050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Bob Weinand ccf863c8ce Merge branch 'PHP-5.6' 2014-04-11 19:35:11 +02:00
Bob Weinand 99d1a1bb3f Shut up, my lovely compiler; I do not like your warnings 2014-04-11 19:33:56 +02:00
Dmitry Stogov 76cc99fe60 Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc) 2014-04-03 15:26:23 +04:00
Dmitry Stogov 1b6327fd3b Fixed string length 2014-03-17 21:38:48 +04:00
Dmitry Stogov 5de7115679 Use better data structures (incomplete; able to run bench.php) 2014-02-18 16:27:38 +04:00
Dmitry Stogov e85790a4d4 Use better data structures (incomplete) 2014-02-14 15:11:21 +04:00
Yasuo Ohgaki 9a5cb51ebc Merge branch 'PHP-5.6'
* PHP-5.6:
  Implement RFC https://wiki.php.net/rfc/default_encoding
2014-02-13 11:56:54 +09:00
Yasuo Ohgaki cbd108abf1 Implement RFC https://wiki.php.net/rfc/default_encoding 2014-02-13 11:54:52 +09:00
Dmitry Stogov f4cfaf36e2 Use better data structures (incomplete) 2014-02-10 10:04:30 +04:00
Xinchen Hui 0f53e37494 Merge branch 'PHP-5.6' 2014-01-03 11:09:07 +08:00
Xinchen Hui c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui 47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Felipe Pena a8a36b7d52 - Fixed build 2013-12-18 08:28:44 -02:00
Kalle Sommer Nielsen ed5a8d510f Pass the TSRMLS parameters to the sapi flush hook, this shaves off a few TSRMLS_FETCH() calls in our various SAPIs 2013-12-18 09:06:39 +01:00
Kalle Sommer Nielsen bd58146ad6 Kill another TSRMLS_FETCH() in the zend extension loading code 2013-12-18 07:59:47 +01:00
Kalle Sommer Nielsen 1433dec2d0 Kill another TSRMLS_FETCH() in zend_indent() 2013-12-12 22:09:38 +01:00