mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Timer container sleep ipc definition added
This commit is contained in:
@@ -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: "
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user