Commit Graph

83 Commits

Author SHA1 Message Date
Anatol Belski
d59fc5951e use cleaner tsrm_intptr_t/tsrm_uintptr_t typedef 2014-12-22 11:08:52 +01:00
Ferenc Kovacs
a9e86957c7 fix zts build on mac/clang 2014-12-21 20:01:39 +01:00
Anatol Belski
24f0d2ed54 make the TSRM macros depend no the macroed cache name 2014-12-16 10:44:43 +01:00
Anatol Belski
64b423d6ed removed the extra tsrm pointer passed to ctor/dtor 2014-12-16 08:03:15 +01:00
Anatol Belski
de99a94c38 explicit passing of *tsrm_ls isn't needed anymore 2014-12-12 08:11:14 +01:00
Anatol Belski
22be00cb3c TSRMLS_D should be void, thanks Dmitry 2014-12-11 10:03:39 +01:00
Anatol Belski
0180912823 default tsrmls cache to NULL 2014-11-19 12:26:24 +01:00
Anatol Belski
8aeffdd74c moved most of the core to use static tsrm ls cache pointer
plus apache2handler, cli and cgi
2014-10-15 16:33:40 +02:00
Anatol Belski
1fc8220b65 TSRMLS_FETCH() is a spent force 2014-10-15 09:46:35 +02:00
Anatol Belski
45e23645a4 linux compat for the static tsrm ls cache pointer 2014-10-02 08:45:53 +02:00
Anatol Belski
76081df168 using pointer to the tsrm ls cache instead of a function call
yet another approach
2014-10-01 22:04:21 +02:00
Anatol Belski
24f9c924d7 prepare some macros to use tsrm cache as pointer
instead of a function call
2014-09-30 19:16:23 +02:00
Anatol Belski
9f9b3585b9 revert the local speedup approach 2014-10-01 01:33:01 +02:00
krakjoe
7d4f7c04b3 approach local pointers in performance sensitive areas 2014-09-27 17:11:56 +01:00
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
Anatol Belski
bec9fd7917 define explicit export/impot spec 2014-09-23 01:22:58 +02:00
Anatol Belski
4db75dc853 basic windows fix 2014-09-22 20:58:45 +02:00
Anatol Belski
2720743636 vars with __declspec(thread) cannot use __declspec(dllexport) 2014-09-20 22:13:10 +02:00
krakjoe
b3aebda9ea native tls initial patch 2014-09-20 20:22:14 +01:00
Anatol Belski
f162b3f736 correct type for the thread id 2014-09-18 17:14:52 +02:00
Anatol Belski
8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Ilia Alshanetsky
939875133a Zend Signal Handling (see RFC: https://wiki.php.net/rfc/zendsignals)
This needs to go into 5.4 as well, but will wait for Pierre to review win32 situation

# Patch by Lucas Nealan, Arnaud Le Blanc, Brian Shire & Ilia Alshanetsky
2011-06-02 21:16:50 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Ilia Alshanetsky
3ea4abe92c update copyright 2010-02-16 13:01:50 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Dmitry Stogov
240fa244c3 Improved PHP binary size and startup speed with GCC4 visibility control (Nuno) 2008-01-30 09:41:12 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Dmitry Stogov
c60eee7046 typo 2007-04-17 06:26:32 +00:00
Dmitry Stogov
e1814f0dbe WIN64 support 2007-04-16 08:09:56 +00:00
Antony Dovgal
286dee8100 MFH 2007-02-15 19:11:48 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Dmitry Stogov
98bacb0e21 Fixed bug #35988 (Unknown persistent list entry type in module shutdown) 2006-03-14 15:16:07 +00:00
Andi Gutmans
30cb5e36b8 - Update to 2006 2006-01-04 23:55:42 +00:00
foobar
894237d531 Fix compile failure with GCC 4.0.x 2005-08-05 22:28:23 +00:00
Wez Furlong
6d978a62f1 Add three new TSRM api functions:
TSRM_API void *tsrm_new_interpreter_context(void);
TSRM_API void *tsrm_set_interpreter_context(void *new_ctx);
TSRM_API void tsrm_free_interpreter_context(void *context);

These can be used, with a suitable SAPI, to host multiple interpreters on
the same thread.
2005-04-27 22:19:54 +00:00
foobar
2d521a73c8 Revert bad fix 2005-03-17 08:15:23 +00:00
Rasmus Lerdorf
effa111c5e Fix Jani breakage 2005-03-16 22:00:07 +00:00
Anantha Kesari H Y
ba980b12ad NetWare can use the tsrm_config.h 2005-02-21 10:01:34 +00:00
Anantha Kesari H Y
bcbca0e397 NetWare has a compliant pthread implementation 2005-02-01 13:04:26 +00:00
foobar
a139dbf9cc - Fix outside-source-tree builds. Always include generated header files
with #include <some_header.h> to make sure the correct file is used.
2005-01-09 21:05:06 +00:00
Wez Furlong
f7a86e5b5e Explicitly include this header for SHFILEINFO.
# no need to MFH
2003-12-03 14:26:41 +00:00
Sebastian Bergmann
60ffd0ea5d Restore HEAD of TSRM to what it was two days ago. 2003-06-25 05:05:06 +00:00
James Cox
76f85107e2 bring head into sync with the php4 branch 2003-06-23 01:27:13 +00:00
Derick Rethans
810ac117f0 - Fix non-ZTS build after Sterling's changes to TSRM 2003-04-28 10:40:28 +00:00
Sterling Hughes
a294f9b2d1 add TSRMLS_FETCH_CTX which allows you to map a variable to a ts context.
This is useful when you are mapping callbacks, you can simply associate
a struct member to a thread context:

void mycallback(my_struct *user) {
	TSRMLS_FETCH_CTX(user->thread_ctx);
}
2003-04-27 21:57:07 +00:00
Zeev Suraski
fb607799cc More Win32 build improvements 2003-02-17 13:27:15 +00:00
Anantha Kesari H Y
455257974b NetWare related changes/modifications. 2003-01-02 14:29:00 +00:00
David Reid
2a0fbded3d Add BeOS thread support to TSRM. This should not impact on any other OS's
but allows us to build PHP with threading support and therefore we can
build as an Apache 2 module.

The locking is currently done using benaphores but this may be reviewed.
2002-10-05 11:26:17 +00:00
Harald Radi
99c90db11a make win32 debug output more verbose 2002-08-07 14:47:42 +00:00
Venkat Raghavan S
ab699a7c2b Change to build on NetWare: TSRM_CONFIG.H not required 2002-05-29 05:16:58 +00:00