Timer container sleep ipc definition added

This commit is contained in:
Amit Mahajan
2009-11-30 18:36:29 +05:30
parent 438fd780f8
commit 9eb5515641
2 changed files with 18 additions and 2 deletions

View File

@@ -231,8 +231,16 @@ int timer_gettime(int devno)
return sp804_read_value(timer[devno].base);
}
void timer_sleep(int sec)
{
/*
* TODO: We need to have a timer struct already present to be used
* as reference for us. to implement this call
*/
}
void handle_requests(void)
{
u32 mr[MR_UNUSED_TOTAL];
l4id_t senderid;
u32 tag;
int ret;
@@ -247,7 +255,11 @@ void handle_requests(void)
/* Syslib conventional ipc data which uses first few mrs. */
tag = l4_get_tag();
senderid = l4_get_sender();
/* Read mrs not used by syslib */
for (int i = 0; i < MR_UNUSED_TOTAL; i++)
mr[i] = read_mr(MR_UNUSED_START + i);
/*
* TODO:
*
@@ -264,6 +276,10 @@ void handle_requests(void)
timer_gettime(1);
break;
case L4_IPC_TAG_TIMER_SLEEP:
timer_sleep(mr[0]);
break;
default:
printf("%s: Error received ipc from 0x%x residing "
"in container %x with an unrecognized tag: "

View File

@@ -74,6 +74,6 @@ extern l4id_t pagerid;
/* For ipc to timer service (TODO: Shared mapping buffers???) */
#define L4_IPC_TAG_TIMER_GETTIME 55
#define L4_IPC_TAG_TIMER_SLEEP 56
#endif /* __IPCDEFS_H__ */