xpmem: porting xpmem v2.6.3

implement xpmem_make, xpmem_remove
This commit is contained in:
Yoichi Umezawa
2016-12-16 17:00:09 +09:00
parent aa15e5eea8
commit f410af1cfc
9 changed files with 1330 additions and 3 deletions

View File

@ -54,6 +54,7 @@
#include <process.h>
#include <bitops.h>
#include <bitmap.h>
#include <xpmem.h>
/* Headers taken from kitten LWK */
#include <lwk/stddef.h>
@ -1062,7 +1063,7 @@ out:
return (int)lerror;
}
static int do_munmap(void *addr, size_t len)
int do_munmap(void *addr, size_t len)
{
int error;
int ro_freed;
@ -2696,6 +2697,21 @@ SYSCALL_DECLARE(ioctl)
return rc;
}
SYSCALL_DECLARE(open)
{
const char *pathname = (const char *)ihk_mc_syscall_arg0(ctx);
long rc;
dkprintf("open(): pathname=%s\n", pathname);
if (!strcmp(pathname, XPMEM_DEV_PATH)) {
rc = xpmem_open(ctx);
} else {
rc = syscall_generic_forwarding(__NR_open, ctx);
}
return rc;
}
SYSCALL_DECLARE(close)
{
int fd = ihk_mc_syscall_arg0(ctx);