aboutsummaryrefslogtreecommitdiff
path: root/risu.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-02-24 17:02:25 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-02-24 17:02:58 +0000
commit02998ad7c3b71add9391b04263c95dbe60c13112 (patch)
tree8f61945b4fa78a0270f40a93d1688834e7498ba2 /risu.h
parent2822f8e8ccfcfa2c618fb2c30e512cdde5e66f47 (diff)
Make reginfo_{init,is_eq,dump,dump_mismatch} official per-CPU API
All CPUs now implement reginfo_{init,is_eq,dump,dump_mismatch} with the same API and semantics. Make this official by moving the prototypes into risu.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'risu.h')
-rw-r--r--risu.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/risu.h b/risu.h
index 1525b3e..d95dace 100644
--- a/risu.h
+++ b/risu.h
@@ -14,6 +14,7 @@
#include <inttypes.h>
#include <stdint.h>
+#include <ucontext.h>
/* Socket related routines */
int master_connect(int port);
@@ -79,4 +80,16 @@ uint64_t get_reginfo_paramreg(struct reginfo *ri);
*/
int get_risuop(struct reginfo *ri);
+/* initialize structure from a ucontext */
+void reginfo_init(struct reginfo *ri, ucontext_t *uc);
+
+/* return 1 if structs are equal, 0 otherwise. */
+int reginfo_is_eq(struct reginfo *r1, struct reginfo *r2);
+
+/* print reginfo state to a stream, returns 1 on success, 0 on failure */
+int reginfo_dump(struct reginfo *ri, FILE *f);
+
+/* reginfo_dump_mismatch: print mismatch details to a stream, ret nonzero=ok */
+int reginfo_dump_mismatch(struct reginfo *m, struct reginfo *a, FILE *f);
+
#endif /* RISU_H */