There's been a prototype for this forever, but the implementation was
missing. Probably because there weren't any callers, but we'll start
using it to implement the kill function.
+2021-06-22 Mike Frysinger <vapier@gentoo.org>
+
+ * callback.c (cb_target_to_host_signal): New function.
+
2021-06-22 Mike Frysinger <vapier@gentoo.org>
* callback.c: Include signal.h.
return host_val;
}
+/* Translate the target's version of a signal number to the host's.
+ This isn't actually the host's version, rather a canonical form.
+ ??? Perhaps this should be renamed to ..._canon_signal. */
+
+int
+cb_target_to_host_signal (host_callback *cb, int target_val)
+{
+ const CB_TARGET_DEFS_MAP *m =
+ cb_target_map_entry (cb->signal_map, target_val);
+
+ return m ? m->host_val : -1;
+}
+
/* Utility for e.g. cb_host_to_target_stat to store values in the target's
stat struct.