Added kernel + libl4 changes for full and extended ipc.

- Short ipc working as normal. Full/extended ipc haven't been tested.
- Added automated compilation and inclusion of test executable in test0.
This commit is contained in:
Bahadir Balban
2009-05-15 19:14:40 +03:00
parent 814eba43dd
commit 93368447f9
21 changed files with 289 additions and 49 deletions

View File

@@ -11,14 +11,14 @@
#include <string.h>
#include <errno.h>
extern char _start_test1[];
extern char _end_test1[];
extern char _start_test_exec[];
extern char _end_test_exec[];
int exectest(void)
{
int fd;
void *exec_start = (void *)_start_test1;
unsigned long size = _end_test1 - _start_test1;
void *exec_start = (void *)_start_test_exec;
unsigned long size = _end_test_exec - _start_test_exec;
int left, cnt;
char *argv[5];
char filename[128];

View File

@@ -0,0 +1,25 @@
/*
* Container entry point for this task.
*
* Copyright (C) 2007-2009 Bahadir Bilgehan Balban
*/
#include <l4lib/types.h>
#include <l4lib/init.h>
#include <l4lib/utcb.h>
#include <posix_init.h> /* Initialisers for posix library */
void main(void);
void __container_init(void)
{
/* Generic L4 thread initialisation */
__l4_init();
/* Initialise posix library for application */
libposix_init();
/* Entry to main */
main();
}

Binary file not shown.

View File

@@ -0,0 +1,36 @@
/*
* Some tests for posix syscalls.
*
* Copyright (C) 2007 Bahadir Balban
*/
#include <stdio.h>
#include <string.h>
#include <l4lib/arch/syslib.h>
#include <l4lib/kip.h>
#include <l4lib/utcb.h>
#include <l4lib/ipcdefs.h>
#include <tests.h>
#include <unistd.h>
#include <sys/types.h>
void wait_pager(l4id_t partner)
{
// printf("%s: Syncing with pager.\n", __TASKNAME__);
for (int i = 0; i < 6; i++)
write_mr(i, i);
l4_send(partner, L4_IPC_TAG_SYNC);
// printf("Pager synced with us.\n");
}
void main(void)
{
wait_pager(0);
if (getpid() == 2) {
printf("EXECVE TEST -- PASSED --\n", getpid());
printf("\n(Thread %d): Continues to sync with the pager...\n", getpid());
while (1)
wait_pager(0);
}
_exit(0);
}

Binary file not shown.