mirror of
https://github.com/drasko/codezero.git
synced 2026-02-10 08:53:15 +01:00
Fixed various minor issues.
Tag setting before ipc via l4 libraries don't seem to work, whereas c0 internally generated ipcs do it correctly.
This commit is contained in:
@@ -71,7 +71,8 @@ void handle_fs_requests(void)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
// printf("\n%s: Started.\n", __FUNCTION__);
|
||||
printf("\n\n%s: Started.\n", __TASKNAME__);
|
||||
|
||||
initialise();
|
||||
|
||||
wait_pager(PAGER_TID);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/*** IPC Tags used between server tasks ***/
|
||||
|
||||
/* For ping ponging */
|
||||
#define L4_IPC_TAG_PINGPONG 3
|
||||
#define L4_IPC_TAG_WAIT 3
|
||||
|
||||
/* To negotiate a shared memory mapping */
|
||||
#define L4_IPC_TAG_SHM 4
|
||||
|
||||
@@ -104,8 +104,8 @@ void handle_requests(void)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
printf("%s: Unrecognised ipc tag (%d)"
|
||||
"received. Ignoring.\n", __TASKNAME__, mr[MR_TAG]);
|
||||
printf("%s: Unrecognised ipc tag (%d) "
|
||||
"received. Ignoring.\n", __TASKNAME__, tag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,28 +9,31 @@
|
||||
#include <l4lib/arch/syslib.h>
|
||||
#include <l4lib/kip.h>
|
||||
#include <l4lib/utcb.h>
|
||||
#include <l4/api/ipc.h>
|
||||
#include <l4lib/ipcdefs.h>
|
||||
#include <tests.h>
|
||||
|
||||
#define __TASKNAME__ "test0"
|
||||
|
||||
void wait_pager(l4id_t partner)
|
||||
{
|
||||
u32 tag = L4_IPC_TAG_WAIT;
|
||||
printf("%s: Syncing with pager.\n", __TASKNAME__);
|
||||
l4_send(partner, tag);
|
||||
l4_send(partner, L4_IPC_TAG_WAIT);
|
||||
printf("Pager synced with us.\n");
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
printf("\n%s: Started.\n", __TASKNAME__);
|
||||
/* Sync with pager */
|
||||
wait_pager(0);
|
||||
while (1)
|
||||
wait_pager(0);
|
||||
|
||||
#if 0
|
||||
/* Check mmap/munmap */
|
||||
mmaptest();
|
||||
|
||||
/* Check shmget/shmat/shmdt */
|
||||
shmtest();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user