<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 揭秘TSRM(Introspecting TSRM)</title>
	<atom:link href="http://www.laruence.com/2008/08/03/201.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.laruence.com/2008/08/03/201.html</link>
	<description>PHP语言, PHP扩展, Zend引擎相关的研究,技术,新闻分享 - 左手代码 右手诗</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:31:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2008/08/03/201.html/comment-page-1#comment-4453</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Mon, 06 Jun 2011 10:31:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=201#comment-4453</guid>
		<description>@liuzhiqiang  恩, 另外, 本文是为了解释TSRM所以设计了一些场景, 而一般的, 如果是模块的globals, 是不需要显示自己调用ts_allocate_id的, PHP的模块加载会做这一步工作</description>
		<content:encoded><![CDATA[<p>@liuzhiqiang  恩, 另外, 本文是为了解释TSRM所以设计了一些场景, 而一般的, 如果是模块的globals, 是不需要显示自己调用ts_allocate_id的, PHP的模块加载会做这一步工作</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: liuzhiqiang</title>
		<link>http://www.laruence.com/2008/08/03/201.html/comment-page-1#comment-4452</link>
		<dc:creator>liuzhiqiang</dc:creator>
		<pubDate>Mon, 06 Jun 2011 10:06:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=201#comment-4452</guid>
		<description>OK，这样就和代码中的逻辑对上了，多谢多谢啊。</description>
		<content:encoded><![CDATA[<p>OK，这样就和代码中的逻辑对上了，多谢多谢啊。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2008/08/03/201.html/comment-page-1#comment-4451</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Mon, 06 Jun 2011 10:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=201#comment-4451</guid>
		<description>@liuzhiqiang 当前线程的全局变量, 模块就是扩展, 每一个扩展都可以有自己的全局变量(不是语言意义的全局变量,而是module_globals)</description>
		<content:encoded><![CDATA[<p>@liuzhiqiang 当前线程的全局变量, 模块就是扩展, 每一个扩展都可以有自己的全局变量(不是语言意义的全局变量,而是module_globals)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: liuzhiqiang</title>
		<link>http://www.laruence.com/2008/08/03/201.html/comment-page-1#comment-4450</link>
		<dc:creator>liuzhiqiang</dc:creator>
		<pubDate>Mon, 06 Jun 2011 09:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=201#comment-4450</guid>
		<description>tsrm_ls中放的是当前线程还是所有线程的全局变量？这里说的模块和线程之间是什么关系？</description>
		<content:encoded><![CDATA[<p>tsrm_ls中放的是当前线程还是所有线程的全局变量？这里说的模块和线程之间是什么关系？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 雪候鸟</title>
		<link>http://www.laruence.com/2008/08/03/201.html/comment-page-1#comment-4449</link>
		<dc:creator>雪候鸟</dc:creator>
		<pubDate>Mon, 06 Jun 2011 07:00:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=201#comment-4449</guid>
		<description>@liuzhiqiang 大体上是这样, 根据thread得到一个thread_id, 根据这个thread_id, 在一个全局的内存空间后给这个thread分配所有申明的全局变量大小总和的空间, 也就是tsrm_ls, 而在每一个模块初始化的时候, 都会分配一个模块id, 也就是对应在tsrm_ls中的偏移.</description>
		<content:encoded><![CDATA[<p>@liuzhiqiang 大体上是这样, 根据thread得到一个thread_id, 根据这个thread_id, 在一个全局的内存空间后给这个thread分配所有申明的全局变量大小总和的空间, 也就是tsrm_ls, 而在每一个模块初始化的时候, 都会分配一个模块id, 也就是对应在tsrm_ls中的偏移.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: liuzhiqiang</title>
		<link>http://www.laruence.com/2008/08/03/201.html/comment-page-1#comment-4446</link>
		<dc:creator>liuzhiqiang</dc:creator>
		<pubDate>Sun, 05 Jun 2011 12:56:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=201#comment-4446</guid>
		<description>看了上面的例子，有个问题还是没弄明白，按照这个(((zend_myextension_globals*)(*((void ***)tsrm_ls))[(myextension_globals_id)-1])-&gt;v)的意思，myextension_globals是放在tsrm_ls里面的，可是这个是如何放进去的呢？

php_myextension_globals_ctor这个函数只是在参数列表里面包含了void ***tsrm_ls，函数体只是初始化变量，并未讲变量村到tsrm_ls中啊。

貌似可能是ts_allocate_id这个函数在完成这个动作，但是怎么实现的呢？

如果真是这样的话，php_myextension_globals_ctor这个函数是不是就不许要第二个参数了？ 即void ***tsrm_ls??

不知道我理解的对不对，请指教啊，十分感谢！！</description>
		<content:encoded><![CDATA[<p>看了上面的例子，有个问题还是没弄明白，按照这个(((zend_myextension_globals*)(*((void ***)tsrm_ls))[(myextension_globals_id)-1])-&gt;v)的意思，myextension_globals是放在tsrm_ls里面的，可是这个是如何放进去的呢？</p>
<p>php_myextension_globals_ctor这个函数只是在参数列表里面包含了void ***tsrm_ls，函数体只是初始化变量，并未讲变量村到tsrm_ls中啊。</p>
<p>貌似可能是ts_allocate_id这个函数在完成这个动作，但是怎么实现的呢？</p>
<p>如果真是这样的话，php_myextension_globals_ctor这个函数是不是就不许要第二个参数了？ 即void ***tsrm_ls??</p>
<p>不知道我理解的对不对，请指教啊，十分感谢！！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention 揭秘TSRM(Introspecting TSRM) &#124; 风雪之隅 -- Topsy.com</title>
		<link>http://www.laruence.com/2008/08/03/201.html/comment-page-1#comment-2579</link>
		<dc:creator>Tweets that mention 揭秘TSRM(Introspecting TSRM) &#124; 风雪之隅 -- Topsy.com</dc:creator>
		<pubDate>Tue, 18 May 2010 09:48:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=201#comment-2579</guid>
		<description>[...] This post was mentioned on Twitter by MC.Spring, sagasw. sagasw said: LuaPython都有类似的概念Env,不算稀奇 RT @mcspring http://bit.ly/9hCPj6 看了 @laruence 同学的这篇文章才明白PHP中的TSRM鱼TSRMLS_?簇名字的含义,缩写真的是太强大了,特别是在C语言中 [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by MC.Spring, sagasw. sagasw said: LuaPython都有类似的概念Env,不算稀奇 RT @mcspring <a href="http://bit.ly/9hCPj6" rel="nofollow">http://bit.ly/9hCPj6</a> 看了 @laruence 同学的这篇文章才明白PHP中的TSRM鱼TSRMLS_?簇名字的含义,缩写真的是太强大了,特别是在C语言中 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackywdx</title>
		<link>http://www.laruence.com/2008/08/03/201.html/comment-page-1#comment-247</link>
		<dc:creator>jackywdx</dc:creator>
		<pubDate>Sun, 26 Oct 2008 09:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.laruence.com/?p=201#comment-247</guid>
		<description>哦，原来这样，前两天正一直在查ZTS这个东东呢，结果一直查不到。呵呵~</description>
		<content:encoded><![CDATA[<p>哦，原来这样，前两天正一直在查ZTS这个东东呢，结果一直查不到。呵呵~</p>
]]></content:encoded>
	</item>
</channel>
</rss>

