GB SIO: Support faster transfer speeds

This commit is contained in:
Jeffrey Pfau 2016-12-26 17:20:51 -08:00
parent c662b59e99
commit daaa2fa523
1 changed files with 3 additions and 3 deletions

View File

@ -116,17 +116,17 @@ static int32_t _masterUpdate(struct GBSIOLockstepNode* node) {
node->transferFinished = false;
needsToWait = true;
ATOMIC_STORE(node->p->d.transferActive, TRANSFER_STARTED);
node->nextEvent += 128;
node->nextEvent += 4;
break;
case TRANSFER_STARTED:
// All the other GBs have caught up and are sleeping, we can all continue now
node->nextEvent += 128;
node->nextEvent += 4;
ATOMIC_STORE(node->p->d.transferActive, TRANSFER_FINISHING);
break;
case TRANSFER_FINISHING:
// Finish the transfer
// We need to make sure the other GBs catch up so they don't get behind
node->nextEvent += LOCKSTEP_INCREMENT - 256; // Split the cycles to avoid waiting too long
node->nextEvent += node->d.p->period - 8; // Split the cycles to avoid waiting too long
#ifndef NDEBUG
ATOMIC_ADD(node->p->d.transferId, 1);
#endif