* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
*/
#include "defs.h"
-
#include <asm/mman.h>
#include <sys/mman.h>
-
#if defined(I386)
# include <asm/ldt.h>
# ifdef HAVE_STRUCT_USER_DESC
/*
* Ugly hacks for systems that have a long long off_t
*/
-#define sys_mmap64 sys_mmap
+# define sys_mmap64 sys_mmap
#endif
int
return RVAL_HEX;
}
-
static const struct xlat mmap_prot[] = {
{ PROT_NONE, "PROT_NONE", },
{ PROT_READ, "PROT_READ" },
{ MAP_EXECUTABLE,"MAP_EXECUTABLE"},
#endif
#ifdef MAP_INHERIT
- { MAP_INHERIT,"MAP_INHERIT" },
+ { MAP_INHERIT, "MAP_INHERIT" },
#endif
#ifdef MAP_FILE
- { MAP_FILE,"MAP_FILE"},
+ { MAP_FILE, "MAP_FILE" },
#endif
#ifdef MAP_LOCKED
- { MAP_LOCKED,"MAP_LOCKED"},
+ { MAP_LOCKED, "MAP_LOCKED" },
#endif
/* FreeBSD ones */
-#ifdef MAP_ANON
- { MAP_ANON, "MAP_ANON" },
+#if defined(MAP_ANON) && (!defined(MAP_ANONYMOUS) || MAP_ANON != MAP_ANONYMOUS)
+ { MAP_ANON, "MAP_ANON" },
#endif
#ifdef MAP_HASSEMAPHORE
- { MAP_HASSEMAPHORE, "MAP_HASSEMAPHORE" },
+ { MAP_HASSEMAPHORE,"MAP_HASSEMAPHORE"},
#endif
#ifdef MAP_STACK
- { MAP_STACK, "MAP_STACK" },
+ { MAP_STACK, "MAP_STACK" },
#endif
#ifdef MAP_NOSYNC
- { MAP_NOSYNC, "MAP_NOSYNC" },
+ { MAP_NOSYNC, "MAP_NOSYNC" },
#endif
#ifdef MAP_NOCORE
- { MAP_NOCORE, "MAP_NOCORE" },
+ { MAP_NOCORE, "MAP_NOCORE" },
#endif
#ifdef TILE
{ MAP_CACHE_NO_LOCAL, "MAP_CACHE_NO_LOCAL" },
}
#endif /* _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T */
-
int
sys_munmap(struct tcb *tcp)
{
return 0;
}
-
static const struct xlat mremap_flags[] = {
{ MREMAP_MAYMOVE, "MREMAP_MAYMOVE" },
#ifdef MREMAP_FIXED
{ 0, NULL },
};
-
int
sys_madvise(struct tcb *tcp)
{
return 0;
}
-
static const struct xlat mlockall_flags[] = {
#ifdef MCL_CURRENT
{ MCL_CURRENT, "MCL_CURRENT" },
return 0;
}
-
-
#ifdef MS_ASYNC
static const struct xlat mctl_sync[] = {
}
#endif
-#if defined(__i386__)
+#if defined(I386)
void
print_ldt_entry(struct modify_ldt_ldt_s *ldt_entry)
{
return 0;
}
-#endif /* __i386__ */
+#endif /* I386 */
#if defined(M68K)
int
return 0;
}
-
#define MPOL_DEFAULT 0
#define MPOL_PREFERRED 1
#define MPOL_BIND 2
#define MPOL_MF_MOVE (1<<1)
#define MPOL_MF_MOVE_ALL (1<<2)
-
static const struct xlat policies[] = {
{ MPOL_DEFAULT, "MPOL_DEFAULT" },
{ MPOL_PREFERRED, "MPOL_PREFERRED" },
{ 0, NULL }
};
-
static void
get_nodes(struct tcb *tcp, unsigned long ptr, unsigned long maxnodes, int err)
{
return 0;
}
+int
+sys_migrate_pages(struct tcb *tcp)
+{
+ if (entering(tcp)) {
+ tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]);
+ get_nodes(tcp, tcp->u_arg[2], tcp->u_arg[1], 0);
+ tprints(", ");
+ get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[1], 0);
+ }
+ return 0;
+}
+
int
sys_move_pages(struct tcb *tcp)
{