aboutsummaryrefslogtreecommitdiff
path: root/include/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-20 23:06:10 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-23 20:05:14 -0400
commitd394a6efed4723b86f8e4f09fc23f6d03a7ad835 (patch)
tree6fd21636c50bf4f62d608cfb975da8707158d360 /include/sim
parent02ddf7223daa1dac8ba532dfd31d5d4d1870e6f4 (diff)
downloadbinutils-d394a6efed4723b86f8e4f09fc23f6d03a7ad835.zip
binutils-d394a6efed4723b86f8e4f09fc23f6d03a7ad835.tar.gz
binutils-d394a6efed4723b86f8e4f09fc23f6d03a7ad835.tar.bz2
sim: callback: add a kill interface
This will make it easier to emulate the syscall. If the kill target is the sim itself, don't do anything. This forces the higher layers to make a decision as to how to handle this event: like halting the overall engine process.
Diffstat (limited to 'include/sim')
-rw-r--r--include/sim/ChangeLog4
-rw-r--r--include/sim/callback.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sim/ChangeLog b/include/sim/ChangeLog
index b98631b..3faea58 100644
--- a/include/sim/ChangeLog
+++ b/include/sim/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-23 Mike Frysinger <vapier@gentoo.org>
+
+ * sim/callback.h (struct host_callback_struct): Add kill.
+
2021-06-22 Mike Frysinger <vapier@gentoo.org>
* sim/callback.h (struct host_callback_struct): Add getpid.
diff --git a/include/sim/callback.h b/include/sim/callback.h
index a6c536b..8d61ebb8 100644
--- a/include/sim/callback.h
+++ b/include/sim/callback.h
@@ -92,6 +92,7 @@ struct host_callback_struct
int (*ftruncate) (host_callback *, int, int64_t);
int (*truncate) (host_callback *, const char *, int64_t);
int (*getpid) (host_callback *);
+ int (*kill) (host_callback *, int, int);
int (*pipe) (host_callback *, int *);
/* Called by the framework when a read call has emptied a pipe buffer. */