cosmetic changes
This commit is contained in:
parent
d9a4acdb22
commit
7edde5cb8f
1 changed files with 14 additions and 20 deletions
|
@ -164,9 +164,6 @@ static void icc_handler(struct state *s)
|
|||
while( iRCCE_mail_recv(&header) == iRCCE_SUCCESS ) {
|
||||
icc_mail_check_tag(header);
|
||||
iRCCE_mail_release(&header);
|
||||
NOP8;
|
||||
NOP8;
|
||||
NOP8;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -495,7 +492,7 @@ int icc_mail_noise(void) {
|
|||
|
||||
void icc_mail_check(void)
|
||||
{
|
||||
iRCCE_MAIL_HEADER* header = NULL;
|
||||
iRCCE_MAIL_HEADER* header = NULL;
|
||||
uint32_t flags;
|
||||
|
||||
/* disable interrupts */
|
||||
|
@ -507,9 +504,6 @@ void icc_mail_check(void)
|
|||
while( iRCCE_mail_recv(&header) == iRCCE_SUCCESS ) {
|
||||
icc_mail_check_tag(header);
|
||||
iRCCE_mail_release( &header );
|
||||
NOP8;
|
||||
NOP8;
|
||||
NOP8;
|
||||
}
|
||||
|
||||
/* enable interrupts */
|
||||
|
@ -519,26 +513,26 @@ void icc_mail_check(void)
|
|||
void icc_wait(int tag)
|
||||
{
|
||||
iRCCE_MAIL_HEADER* header = NULL;
|
||||
uint32_t flags, done = 0;
|
||||
uint32_t flags;
|
||||
|
||||
/* disable interrupts */
|
||||
flags = irq_nested_disable();
|
||||
|
||||
do {
|
||||
iRCCE_mail_check(iRCCE_MAILBOX_ALL);
|
||||
retry:
|
||||
iRCCE_mail_check(iRCCE_MAILBOX_ALL);
|
||||
|
||||
/* empty mail queue */
|
||||
while( iRCCE_mail_recv(&header) == iRCCE_SUCCESS ) {
|
||||
icc_mail_check_tag(header);
|
||||
if (header->tag == tag)
|
||||
done = 1;
|
||||
/* empty mail queue */
|
||||
while( iRCCE_mail_recv(&header) == iRCCE_SUCCESS ) {
|
||||
icc_mail_check_tag(header);
|
||||
if (header->tag == tag) {
|
||||
iRCCE_mail_release( &header );
|
||||
NOP8;
|
||||
NOP8;
|
||||
NOP8;
|
||||
}
|
||||
} while(!done);
|
||||
goto out;
|
||||
} else iRCCE_mail_release( &header );
|
||||
}
|
||||
|
||||
goto retry;
|
||||
|
||||
out:
|
||||
/* enable interrupts */
|
||||
irq_nested_enable(flags);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue