示例#1
0
void ST_mmgc_threads::test0() {
       startSlave();
       MMGC_GCENTER(gc);
       RCObjectNotifier *obj = new (gc) RCObjectNotifier(&isDead);
       {
          gc->CreateRootFromCurrentStack(kickAndWait, this);
       }

#line 154 "ST_mmgc_threads.st"
verifyPass(result, "result", __FILE__, __LINE__);

#line 156 "ST_mmgc_threads.st"
verifyPass(!isDead, "!isDead", __FILE__, __LINE__);
       gc->ReapZCT();
#line 158 "ST_mmgc_threads.st"
verifyPass(!isDead, "!isDead", __FILE__, __LINE__);
       gc->Collect();
#line 160 "ST_mmgc_threads.st"
verifyPass(!isDead, "!isDead", __FILE__, __LINE__);

       pthread_join(pthread, NULL);

       printf("Ignore this: %d\n", *obj->isDead);

}
示例#2
0
	void slaveRun()
	{
		wait();
        {
		 MMGC_GCENTER(gc);	
  	     result &= !isDead;
	     gc->ReapZCT();
  	     result &= !isDead;
	     gc->Collect();
		 result &= !isDead;
		}
 		kick();
	}
示例#3
0
void ST_mmgc_threads::test0() {
	   startSlave();
	   MMGC_GCENTER(gc);
   	   /*RCObject *obj =*/ new (gc) RCObjectNotifier(&isDead);
	   {
          MMGC_GC_ROOT_THREAD(gc);
		  kick();
    	  wait();
       }

verifyPass(result, "result", __FILE__, __LINE__);

verifyPass(!isDead, "!isDead", __FILE__, __LINE__);
	   gc->ReapZCT();
verifyPass(!isDead, "!isDead", __FILE__, __LINE__);
	   gc->Collect();
verifyPass(!isDead, "!isDead", __FILE__, __LINE__);

	   pthread_join(pthread, NULL);

}