check five times the receive buffers because a remote interrupt could pass the mail

This commit is contained in:
Stefan Lankes 2011-11-29 03:22:01 -08:00
parent ef750e1c31
commit 54b1c3e6ac

View file

@ -207,6 +207,7 @@ int iRCCE_mail_check(int sender) {
return iRCCE_MAILBOX_CLOSED;
}
for(i=0; i<5; i++) {
RC_cache_invalidate();
if( iRCCE_mailbox_recv[sender]->sent ) {
/* disable interrupts */
@ -222,10 +223,12 @@ int iRCCE_mail_check(int sender) {
irq_nested_enable(flags);
return iRCCE_SUCCESS;
} else {
return iRCCE_MAILBOX_EMPTY;
}
NOP8;
}
return iRCCE_MAILBOX_EMPTY;
}
//------------------------------------------------------------------------------