The cris linux syscall layers assume getpid returns a constant,
so add a custom function to provide that.
+2021-06-23 Mike Frysinger <vapier@gentoo.org>
+
+ * traps.c (cris_getpid): New function.
+ (cris_set_callbacks): Assign cris_getpid.
+
2021-06-22 Mike Frysinger <vapier@gentoo.org>
* sim-if.c: Include sim-hw.h.
return TARGET_TIME (current_cpu_for_cb_callback);
}
+static int
+cris_getpid (host_callback *cb ATTRIBUTE_UNUSED)
+{
+ return TARGET_PID;
+}
+
/* Set target-specific callback data. */
void
cb->syscall_map = (CB_TARGET_DEFS_MAP *) syscall_map;
cb->errno_map = (CB_TARGET_DEFS_MAP *) errno_map;
+ cb->getpid = cris_getpid;
+
/* The kernel stat64 layout. If we see a file > 2G, the "long"
parameter to cb_store_target_endian will make st_size negative.
Similarly for st_ino. FIXME: Find a 64-bit type, and use it