#endif
int
-sys_brk(tcp)
-struct tcb *tcp;
+sys_brk(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx", tcp->u_arg[0]);
#if defined(FREEBSD) || defined(SUNOS4)
int
-sys_sbrk(tcp)
-struct tcb *tcp;
+sys_sbrk(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
#endif
#ifdef MAP_NOCORE
{ MAP_NOCORE, "MAP_NOCORE" },
+#endif
+#ifdef TILE
+ { MAP_CACHE_NO_LOCAL, "MAP_CACHE_NO_LOCAL" },
+ { MAP_CACHE_NO_L2, "MAP_CACHE_NO_L2" },
+ { MAP_CACHE_NO_L1, "MAP_CACHE_NO_L1" },
#endif
{ 0, NULL },
};
-#if !HAVE_LONG_LONG_OFF_T
+#ifdef TILE
static
int
-print_mmap(tcp,u_arg, offset)
-struct tcb *tcp;
-long *u_arg;
-long long offset;
+addtileflags(flags)
+long flags;
+{
+ long home = flags & _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK);
+ flags &= ~_MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK);
+
+ if (flags & _MAP_CACHE_INCOHERENT) {
+ flags &= ~_MAP_CACHE_INCOHERENT;
+ if (home == MAP_CACHE_HOME_NONE) {
+ tprintf("|MAP_CACHE_INCOHERENT");
+ return flags;
+ }
+ tprintf("|_MAP_CACHE_INCOHERENT");
+ }
+
+ switch (home) {
+ case 0: break;
+ case MAP_CACHE_HOME_HERE: tprintf("|MAP_CACHE_HOME_HERE"); break;
+ case MAP_CACHE_HOME_NONE: tprintf("|MAP_CACHE_HOME_NONE"); break;
+ case MAP_CACHE_HOME_SINGLE: tprintf("|MAP_CACHE_HOME_SINGLE"); break;
+ case MAP_CACHE_HOME_TASK: tprintf("|MAP_CACHE_HOME_TASK"); break;
+ case MAP_CACHE_HOME_HASH: tprintf("|MAP_CACHE_HOME_HASH"); break;
+ default:
+ tprintf("|MAP_CACHE_HOME(%d)",
+ (home >> _MAP_CACHE_HOME_SHIFT) );
+ break;
+ }
+
+ return flags;
+}
+#endif
+
+#if !HAVE_LONG_LONG_OFF_T
+static int
+print_mmap(struct tcb *tcp, long *u_arg, long long offset)
{
if (entering(tcp)) {
/* addr */
/* flags */
#ifdef MAP_TYPE
printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
+#ifdef TILE
+ addflags(mmap_flags, addtileflags(u_arg[3] & ~MAP_TYPE));
+#else
addflags(mmap_flags, u_arg[3] & ~MAP_TYPE);
+#endif
#else
printflags(mmap_flags, u_arg[3], "MAP_???");
#endif
- /* fd (is always int, not long) */
- tprintf(", %d, ", (int)u_arg[4]);
+ /* fd */
+ tprintf(", ");
+ printfd(tcp, u_arg[4]);
/* offset */
- tprintf("%#llx", offset);
+ tprintf(", %#llx", offset);
}
return RVAL_HEX;
}
#ifdef LINUX
-int sys_old_mmap(tcp)
-struct tcb *tcp;
+int sys_old_mmap(struct tcb *tcp)
{
long u_arg[6];
#endif
int
-sys_mmap(tcp)
-struct tcb *tcp;
+sys_mmap(struct tcb *tcp)
{
long long offset = tcp->u_arg[5];
#if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
int
-sys_mmap64(tcp)
-struct tcb *tcp;
+sys_mmap64(struct tcb *tcp)
{
#ifdef linux
#ifdef ALPHA
printflags(mmap_flags, u_arg[3], "MAP_???");
#endif
/* fd */
- tprintf(", %ld, ", u_arg[4]);
+ tprintf(", ");
+ printfd(tcp, tcp->u_arg[4]);
/* offset */
- printllval(tcp, "%#llx", 5);
+ printllval(tcp, ", %#llx", 5);
}
return RVAL_HEX;
}
int
-sys_munmap(tcp)
-struct tcb *tcp;
+sys_munmap(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx, %lu",
}
int
-sys_mprotect(tcp)
-struct tcb *tcp;
+sys_mprotect(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx, %lu, ",
static const struct xlat mremap_flags[] = {
{ MREMAP_MAYMOVE, "MREMAP_MAYMOVE" },
+#ifdef MREMAP_FIXED
+ { MREMAP_FIXED, "MREMAP_FIXED" },
+#endif
{ 0, NULL }
};
int
-sys_mremap(tcp)
-struct tcb *tcp;
+sys_mremap(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx, %lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1],
tcp->u_arg[2]);
printflags(mremap_flags, tcp->u_arg[3], "MREMAP_???");
+#ifdef MREMAP_FIXED
+ if ((tcp->u_arg[3] & (MREMAP_MAYMOVE | MREMAP_FIXED)) ==
+ (MREMAP_MAYMOVE | MREMAP_FIXED))
+ tprintf(", %#lx", tcp->u_arg[4]);
+#endif
}
return RVAL_HEX;
}
int
-sys_madvise(tcp)
-struct tcb *tcp;
+sys_madvise(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
};
int
-sys_mlockall(tcp)
-struct tcb *tcp;
+sys_mlockall(struct tcb *tcp)
{
if (entering(tcp)) {
printflags(mlockall_flags, tcp->u_arg[0], "MCL_???");
};
int
-sys_msync(tcp)
-struct tcb *tcp;
+sys_msync(struct tcb *tcp)
{
if (entering(tcp)) {
/* addr */
};
int
-sys_mctl(tcp)
-struct tcb *tcp;
+sys_mctl(struct tcb *tcp)
{
int arg, function;
#endif /* MC_SYNC */
int
-sys_mincore(tcp)
-struct tcb *tcp;
+sys_mincore(struct tcb *tcp)
{
unsigned long i, len;
char *vec = NULL;
#if defined(ALPHA) || defined(FREEBSD) || defined(IA64) || defined(SUNOS4) || defined(SVR4) || defined(SPARC) || defined(SPARC64)
int
-sys_getpagesize(tcp)
-struct tcb *tcp;
+sys_getpagesize(struct tcb *tcp)
{
if (exiting(tcp))
return RVAL_HEX;
}
int
-sys_modify_ldt(tcp)
-struct tcb *tcp;
+sys_modify_ldt(struct tcb *tcp)
{
if (entering(tcp)) {
struct modify_ldt_ldt_s copy;
}
int
-sys_set_thread_area(tcp)
-struct tcb *tcp;
+sys_set_thread_area(struct tcb *tcp)
{
struct modify_ldt_ldt_s copy;
if (entering(tcp)) {
}
int
-sys_get_thread_area(tcp)
-struct tcb *tcp;
+sys_get_thread_area(struct tcb *tcp)
{
struct modify_ldt_ldt_s copy;
if (exiting(tcp)) {
}
#endif /* LINUX && __i386__ */
+#if defined(LINUX) && defined(M68K)
+
+int
+sys_set_thread_area(struct tcb *tcp)
+{
+ if (entering(tcp))
+ tprintf("%#lx", tcp->u_arg[0]);
+ return 0;
+
+}
+
+int
+sys_get_thread_area(struct tcb *tcp)
+{
+ return RVAL_HEX;
+}
+#endif
+
#if defined(LINUX)
int
-sys_remap_file_pages(tcp)
-struct tcb *tcp;
+sys_remap_file_pages(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
static void
-get_nodes(tcp, ptr, maxnodes, err)
-struct tcb *tcp;
-unsigned long ptr;
-unsigned long maxnodes;
-int err;
+get_nodes(struct tcb *tcp, unsigned long ptr, unsigned long maxnodes, int err)
{
unsigned long nlongs, size, end;
}
int
-sys_mbind(tcp)
-struct tcb *tcp;
+sys_mbind(struct tcb *tcp)
{
if (entering(tcp)) {
- tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
+ tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
printxval(policies, tcp->u_arg[2], "MPOL_???");
get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[4], 0);
tprintf(", ");
}
int
-sys_set_mempolicy(tcp)
-struct tcb *tcp;
+sys_set_mempolicy(struct tcb *tcp)
{
if (entering(tcp)) {
printxval(policies, tcp->u_arg[0], "MPOL_???");
}
int
-sys_get_mempolicy(tcp)
-struct tcb *tcp;
+sys_get_mempolicy(struct tcb *tcp)
{
if (exiting(tcp)) {
int pol;
}
int
-sys_move_pages(tcp)
-struct tcb *tcp;
+sys_move_pages(struct tcb *tcp)
{
if (entering(tcp)) {
unsigned long npages = tcp->u_arg[1];
#if defined(LINUX) && defined(POWERPC)
int
-sys_subpage_prot(tcp)
-struct tcb *tcp;
+sys_subpage_prot(struct tcb *tcp)
{
if (entering(tcp)) {
unsigned long cur, end, abbrev_end, entries;