Esempio 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);
		 }
   }
}
Esempio n. 2
0
File: Pass.cpp Progetto: Philpo/test
void Pass::fiberEntryTail(uint64_t argOnInitialize, uint64_t argOnRun) {
  cout << "finished" << endl;
  int ret = sceFiberReturnToThread(0, NULL);
  assert(ret == SCE_OK);
}