diff --git a/internals2/memory/TSRM.xml b/internals2/memory/TSRM.xml index 08e18dc653..1b34579733 100644 --- a/internals2/memory/TSRM.xml +++ b/internals2/memory/TSRM.xml @@ -42,88 +42,88 @@ - - The API documented hereafter is aimed at advanced use of TSRM. It is not ordinary for extensions to have to interact with TSRM directly, the pecl programmer should use API's above TSRM such as the Module Globals API which used correctly will ensure safety in ZTS mode for you. - - - TSRM Internals - - - - Prototype - Description - - - - - - typedef int ts_rsrc_id - The type definition to represent a resource by numeric identifiers - - - - int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename) - expected_threads and expected_resources are not hard limits. debug_level and debug_filename only have an effect on windows in Debug mode or when TSRM_DEBUG is defined. Called once per process in ZTS mode during server startup. - - - - void tsrm_shutdown(void) - - Should be the last thing called in the process to destroy and free all storage TSRM storage in ZTS mode. - - - - - ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor) - - Allocates and thread safe pointer of size bytes, calling ctor on the pointer, assigning (and returning) the id to rsrc_id, the dtor is called when the resource is free'd. Module globals are isolated in ZTS mode using this API. - - - - - void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id) - - Fetches a resource by previously allocated id from the entries created by the specified thread identifed by th_id. - - - - - - void *ts_resource(ts_rsrc_id id) - - - Fetches a resource by previously allocated id from the entries created by the calling thread. - - - - - void ts_free_thread(void) - - Destroys and frees the entries for the calling thread, currently this API is only used by ISAPI module. - - - - - - void ts_free_id(ts_rsrc_id id) - - - Destroys the resource identified by previously allocated id. Module globals are cleaned up in ZTS mode using this API. - - - - -
- - - There are more TSRM API functions to enable the creation and destruction of interpreter contexts, the usage of such functionality is out of the scope of this documentation, please see TSRM/TSRM.h for more information. - - -
+ TSRM API - - TSRM Mutex API + The API documented hereafter is aimed at advanced use of TSRM. It is not ordinary for extensions to have to interact with TSRM directly, the pecl programmer should use API's above TSRM such as the Module Globals API which used correctly will ensure safety in ZTS mode for you. + + +
+ TSRM Internals + + + + Prototype + Description + + + + + + typedef int ts_rsrc_id + The type definition to represent a resource by numeric identifiers + + + + int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename) + expected_threads and expected_resources are not hard limits. debug_level and debug_filename only have an effect on windows in Debug mode or when TSRM_DEBUG is defined. Called once per process in ZTS mode during server startup. + + + + void tsrm_shutdown(void) + + Should be the last thing called in the process to destroy and free all storage TSRM storage in ZTS mode. + + + + + ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor) + + Allocates and thread safe pointer of size bytes, calling ctor on the pointer, assigning (and returning) the id to rsrc_id, the dtor is called when the resource is free'd. Module globals are isolated in ZTS mode using this API. + + + + + void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id) + + Fetches a resource by previously allocated id from the entries created by the specified thread identifed by th_id. + + + + + + void *ts_resource(ts_rsrc_id id) + + + Fetches a resource by previously allocated id from the entries created by the calling thread. + + + + + void ts_free_thread(void) + + Destroys and frees the entries for the calling thread, currently this API is only used by ISAPI module. + + + + + + void ts_free_id(ts_rsrc_id id) + + + Destroys the resource identified by previously allocated id. Module globals are cleaned up in ZTS mode using this API. + + + + +
+ + + There are more TSRM API functions to enable the creation and destruction of interpreter contexts, the usage of such functionality is out of the scope of this documentation, please see TSRM/TSRM.h for more information. + + + TSRM Mutex API + @@ -164,7 +164,6 @@ The mutex API is exposed by TSRM. However, its internal usage is far too wide to document usefully here, none the less, basic functionality and prototypes are documented here. -