Ejemplo n.º 1
0
void co_switch(cothread_t cothread)
{

   uint32_t argOnReturn = 0;
   if(cothread == (cothread_t)1){
     co_active_ = cothread;
     sceFiberReturnToThread(0, NULL);
   }else{
		 SceFiber* theFiber = (SceFiber*)cothread;
		 if(co_active_ == (cothread_t)1){
			 co_active_ = cothread;
			 sceFiberRun(theFiber, 0, &argOnReturn);
		 }else{
			 co_active_ = cothread;
			 sceFiberSwitch(theFiber, 0, &argOnReturn);
		 }
   }
}
Ejemplo n.º 2
0
Archivo: Pass.cpp Proyecto: Philpo/test
void Pass::fiberEntryTail(uint64_t argOnInitialize, uint64_t argOnRun) {
  cout << "finished" << endl;
  int ret = sceFiberReturnToThread(0, NULL);
  assert(ret == SCE_OK);
}