Client/Server example showing how to map a page to another task – Client implementation. Note that there's also a shared memory library that supplies this functionality in more convenient way.
#include <stdio.h>
#include "shared.h"
static int
{
int err;
{
printf("The reservation of one page within our virtual memory failed with %d\n", err);
return 1;
}
if (r)
return r;
printf("String sent by server: %s\n", (char *)addr);
return 0;
}
int
main()
{
{
printf("Could not get capability slot!\n");
return 1;
}
printf("Asking for page from server\n");
if (func_smap_call(server))
{
printf("Error talking to server\n");
return 1;
}
printf("It worked!\n");
return 0;
}