Message ID | 1467909880-18834-3-git-send-email-sergey.fedorov@linaro.org |
---|---|
State | New |
Headers | show |
diff --git a/tcg/tcg.h b/tcg/tcg.h index 66d7fc01c53c..ca9329d99f90 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -648,6 +648,7 @@ void tcg_pool_delete(TCGContext *s); void tb_lock(void); void tb_unlock(void); +bool tb_lock_locked(void); void tb_lock_reset(void); static inline void *tcg_malloc(int size) diff --git a/translate-all.c b/translate-all.c index 97e834a84503..0dfcf9bc3430 100644 --- a/translate-all.c +++ b/translate-all.c @@ -143,6 +143,15 @@ void tb_unlock(void) #endif } +bool tb_lock_locked(void) +{ +#ifdef CONFIG_USER_ONLY + return have_tb_lock; +#else + return true; +#endif +} + void tb_lock_reset(void) { #ifdef CONFIG_USER_ONLY