2003-03-04 Ulrich Drepper <drepper@redhat.com>

* mem.c [LINUX] (sys_remap_file_pages): New function.
	* linux/syscall.h: Declare it.
	* linux/syscallent.h: Use it.
	* linux/powerpc/syscallent.h: Likewise.
This commit is contained in:
Roland McGrath 2003-03-05 04:08:00 +00:00
parent 8dfa04a174
commit 72c5b7bf73
4 changed files with 29 additions and 3 deletions

View File

@ -268,7 +268,7 @@
{ 1, 0, printargs, "epoll_create" }, /* 236 */
{ 4, 0, printargs, "epoll_ctl" }, /* 237 */
{ 4, 0, printargs, "epoll_wait" }, /* 238 */
{ 5, 0, printargs, "remap_file_pages" }, /* 239 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages" }, /* 239 */
{ 1, 0, printargs, "set_tid_address" }, /* 240 */
{ 5, 0, printargs, "SYS_241" }, /* 241 */
{ 5, 0, printargs, "SYS_242" }, /* 242 */

View File

@ -88,7 +88,7 @@ int sys_getpmsg(), sys_putpmsg(), sys_readahead(), sys_sendfile64();
int sys_setxattr(), sys_fsetxattr(), sys_getxattr(), sys_fgetxattr();
int sys_listxattr(), sys_flistxattr(), sys_removexattr(), sys_fremovexattr();
int sys_sched_setaffinity(), sys_sched_getaffinity(), sys_futex();
int sys_set_thread_area(), sys_get_thread_area();
int sys_set_thread_area(), sys_get_thread_area(), sys_remap_file_pages();
/* sys_socketcall subcalls */

View File

@ -303,7 +303,7 @@
{ 1, 0, printargs, "epoll_create" }, /* 254 */
{ 4, 0, printargs, "epoll_ctl" }, /* 255 */
{ 4, 0, printargs, "epoll_wait" }, /* 256 */
{ 5, 0, printargs, "remap_file_pages"}, /* 257 */
{ 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 257 */
{ 1, 0, printargs, "set_tid_address"}, /* 258 */
{ 5, 0, printargs, "SYS_259" }, /* 259 */
{ 5, 0, printargs, "SYS_260" }, /* 260 */

26
mem.c
View File

@ -92,6 +92,12 @@ static struct xlat mmap_flags[] = {
#endif
#ifdef MAP_NORESERVE
{ MAP_NORESERVE,"MAP_NORESERVE" },
#endif
#ifdef MAP_POPULATE
{ MAP_POPULATE, "MAP_POPULATE" },
#endif
#ifdef MAP_NONBLOCK
{ MAP_NONBLOCK, "MAP_NONBLOCK" },
#endif
/*
* XXX - this was introduced in SunOS 4.x to distinguish between
@ -601,3 +607,23 @@ struct tcb *tcp;
}
#endif /* LINUX && __i386__ */
#if defined(LINUX)
int
sys_remap_file_pages(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
printflags(mmap_prot, tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[3]);
#ifdef MAP_TYPE
printxval(mmap_flags, tcp->u_arg[4] & MAP_TYPE, "MAP_???");
addflags(mmap_flags, tcp->u_arg[4] & ~MAP_TYPE);
#else
printflags(mmap_flags, tcp->u_arg[4]);
#endif
}
return 0;
}
#endif