diff options
author | Emilio G. Cota <cota@braap.org> | 2018-02-22 20:50:29 -0500 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2018-06-15 07:42:55 -1000 |
commit | faa9372c07d062eb01f9da72e3f6c0f32efffca7 (patch) | |
tree | 96b3a39266f5222e795c5f90e03b86c91e28384a /include/exec | |
parent | 6d9abf85d538731ccff25fc29d7fa938115b1a80 (diff) |
translate-all: introduce assert_no_pages_locked
The appended adds assertions to make sure we do not longjmp with page
locks held. Note that user-mode has nothing to check, since page_locks
are !user-mode only.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r-- | include/exec/exec-all.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 8d92e3cea9..4f07a17052 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -435,6 +435,14 @@ void tb_lock(void); void tb_unlock(void); void tb_lock_reset(void); +#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_DEBUG_TCG) +void assert_no_pages_locked(void); +#else +static inline void assert_no_pages_locked(void) +{ +} +#endif + #if !defined(CONFIG_USER_ONLY) /** |