⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clause.d

📁 Sun Solaris 10 中的 DTrace 组件的源代码。请参看: http://www.sun.com/software/solaris/observability.jsp
💻 D
字号:
int me;			/* an integer global variable */this int foo;		/* an integer clause-local variable */tick-1sec{	/*	 * Set foo to be 10 if and only if this is the first clause executed.	 */	this->foo = (me % 3 == 0) ? 10 : this->foo;	printf("Clause 1 is number %d; foo is %d\n", me++ % 3, this->foo++);}tick-1sec{	/*	 * Set foo to be 20 if and only if this is the first clause executed. 	 */	this->foo = (me % 3 == 0) ? 20 : this->foo;	printf("Clause 2 is number %d; foo is %d\n", me++ % 3, this->foo++);}tick-1sec{	/*	 * Set foo to be 30 if and only if this is the first clause executed.	 */	this->foo = (me % 3 == 0) ? 30 : this->foo;	printf("Clause 3 is number %d; foo is %d\n", me++ % 3, this->foo++);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -