Hello, Ive been having some problems while trying to request a page from
sigma0. I have included the source code ... any help ?
many thanks!
------[ source begins here ]------
#include <l4/types.h>
#include <l4/syscalls.h>
#include <l4/ipc.h>
#include <stdio.h>
#define SIGMA0_ID 4
void main(void)
{
l4_threadid_t sigma0;
l4_msgdope_t msg, result;
dword_t addr, type, foo, *r_add;
addr = 0x80000;
type = L4_IPC_SHORT_MSG;
sigma0.id.task = SIGMA0_ID;
sigma0.id.lthread = 0;
r_add = 0x0;
while(r_add == 0x0) {
addr += 4096; /* pasamos a la siguiente pagina de 4K */
printf("Vamos a pedir la region de memoria 0x%x\n", addr);
l4_i386_ipc_send(sigma0,(void *) type, addr, addr, L4_IPC_NEVER, &result);
printf("ipc enviado ...");
l4_i386_ipc_receive(sigma0, L4_IPC_MAPMSG(addr, 4096), r_add, &foo, L4_IPC_NEVER, &result);
printf("%p recivido\n", r_add);
}
*r_add = 'a';
r_add++;
*r_add = 0x7;
r_add --;
if(*r_add == 'a')
printf("BINGO!\n");
printf("Done!\n");
}
Cervi~no Ulises <kermit(a)tower.com.ar> <ulises(a)rosario.linux.org.ar>
...............................................................................
"Contrary to popular opinion, Unix is user friendly, It just happens to be
very selective about who it makes friends with."