diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-02-24 17:02:25 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-02-24 17:02:58 +0000 |
commit | 31e34835ebbf98beab46e6d2ae832a1dd6e054de (patch) | |
tree | 470c9c72351f25c096770f7478cc05ec4daae914 /risu.h | |
parent | 02998ad7c3b71add9391b04263c95dbe60c13112 (diff) |
Move send_register_info() to reginfo.c
send_register_info() is now essentially the same code for all
target CPUs, so move it into reginfo.c rather than having
duplicated code.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'risu.h')
-rw-r--r-- | risu.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -16,6 +16,15 @@ #include <stdint.h> #include <ucontext.h> +/* GCC computed include to pull in the correct risu_reginfo_*.h for + * the architecture. + */ +#define REGINFO_HEADER2(X) #X +#define REGINFO_HEADER1(ARCHNAME) REGINFO_HEADER2(risu_reginfo_ ## ARCHNAME.h) +#define REGINFO_HEADER(ARCH) REGINFO_HEADER1(ARCH) + +#include REGINFO_HEADER(ARCH) + /* Socket related routines */ int master_connect(int port); int apprentice_connect(const char *hostname, int port); @@ -40,7 +49,7 @@ extern int test_fp_exc; struct reginfo; -/* Interface provided by CPU-specific code: */ +/* Functions operating on reginfo */ /* Send the register information from the struct ucontext down the socket. * Return the response code from the master. @@ -48,6 +57,8 @@ struct reginfo; */ int send_register_info(int sock, void *uc); +/* Interface provided by CPU-specific code: */ + /* Read register info from the socket and compare it with that from the * ucontext. Return 0 for match, 1 for end-of-test, 2 for mismatch. * NB: called from a signal handler. |