testing mail_check
This commit is contained in:
parent
0d5eb14892
commit
fbd30d8f5a
4 changed files with 14 additions and 10 deletions
|
@ -235,7 +235,10 @@ void irq_handler(struct state *s)
|
|||
void (*handler) (struct state * s);
|
||||
|
||||
// at first, we check our work queues
|
||||
if( s->int_no == 124 ) check_workqueues();
|
||||
if( s->int_no == 124 ) {
|
||||
kprintf( "Got remote interrupt!\n" );
|
||||
check_workqueues();
|
||||
}
|
||||
|
||||
/*
|
||||
* Find out if we have a custom handler to run for this
|
||||
|
|
|
@ -169,12 +169,10 @@ int iRCCE_mail_recv(
|
|||
iRCCE_mailbox_recv_queue[i]->next;
|
||||
help_header->next = NULL;
|
||||
|
||||
|
||||
*header = help_header;
|
||||
return iRCCE_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
// no mail queued
|
||||
*header = NULL;
|
||||
return iRCCE_MAILBOX_EMPTY;
|
||||
|
|
|
@ -234,6 +234,8 @@ int icc_ping(int ue)
|
|||
|
||||
int icc_mail_ping( void )
|
||||
{
|
||||
kprintf( "Hello from mail_ping ... \n" );
|
||||
|
||||
uint32_t flags;
|
||||
uint64_t timer;
|
||||
int remote_rank = (my_ue+1)%2;
|
||||
|
@ -249,7 +251,7 @@ int icc_mail_ping( void )
|
|||
timer = rdtsc();
|
||||
|
||||
iRCCE_mail_send( 0, 1, 0, NULL, remote_rank );
|
||||
kprintf( "Sent pingrequest to %d ...\n", remote_rank );
|
||||
// kprintf( "Sent pingrequest to %d ...\n", remote_rank );
|
||||
|
||||
|
||||
// wake up receiver
|
||||
|
@ -347,10 +349,10 @@ void icc_check(void)
|
|||
|
||||
void icc_mail_check(void)
|
||||
{
|
||||
if( !my_ue ) return ;
|
||||
|
||||
iRCCE_MAIL_HEADER* header;
|
||||
int res;
|
||||
int res, count = 0;
|
||||
|
||||
// if( !my_ue ) return;
|
||||
|
||||
kprintf( "Hello from icc_mail_check() \n" );
|
||||
|
||||
|
@ -361,9 +363,11 @@ void icc_mail_check(void)
|
|||
kprintf( "Received mail_ping request ...\n" );
|
||||
iRCCE_mail_send( 0, 2, 0, NULL, header->source );
|
||||
}
|
||||
|
||||
count++;
|
||||
iRCCE_mail_release( &header );
|
||||
} while( res == iRCCE_SUCCESS );
|
||||
|
||||
kprintf( "received %d headers!\n", count );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -86,7 +86,6 @@ int main(void)
|
|||
kprintf("This is MetalSVM %s Build %u, %u\n",
|
||||
METALSVM_VERSION, &__BUILD_DATE, &__BUILD_TIME);
|
||||
popbg();
|
||||
|
||||
system_init();
|
||||
irq_init();
|
||||
timer_init();
|
||||
|
@ -103,7 +102,6 @@ int main(void)
|
|||
irq_enable();
|
||||
|
||||
kprintf("Kernel starts at %p and ends at %p\n", &kernel_start, &kernel_end);
|
||||
|
||||
system_calibration();
|
||||
network_init();
|
||||
|
||||
|
@ -115,6 +113,7 @@ int main(void)
|
|||
sleep(5);
|
||||
list_root();
|
||||
// test_init();
|
||||
kprintf( "starting mailbox ...\n " );
|
||||
mailbox_test_init();
|
||||
per_core(current_task)->status = TASK_IDLE;
|
||||
reschedule();
|
||||
|
|
Loading…
Add table
Reference in a new issue