diff mbox

[06/22] translate-all: make have_tb_lock static

Message ID 1499586614-20507-7-git-send-email-cota@braap.org (mailing list archive)
State New, archived
Headers show

Commit Message

Emilio Cota July 9, 2017, 7:49 a.m. UTC
It is only used by this object, and it's not exported to any other.

Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 accel/tcg/translate-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Henderson July 9, 2017, 8:02 p.m. UTC | #1
On 07/08/2017 09:49 PM, Emilio G. Cota wrote:
> It is only used by this object, and it's not exported to any other.
> 
> Signed-off-by: Emilio G. Cota<cota@braap.org>
> ---
>   accel/tcg/translate-all.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~
Alex Bennée July 12, 2017, 2:38 p.m. UTC | #2
Emilio G. Cota <cota@braap.org> writes:

> It is only used by this object, and it's not exported to any other.
>
> Signed-off-by: Emilio G. Cota <cota@braap.org>

I was almost caught out by the name re-use in cpu-exec.c ;-)

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  accel/tcg/translate-all.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
> index 72ce445..2fa9f65 100644
> --- a/accel/tcg/translate-all.c
> +++ b/accel/tcg/translate-all.c
> @@ -133,7 +133,7 @@ TCGContext tcg_ctx;
>  bool parallel_cpus;
>
>  /* translation block context */
> -__thread int have_tb_lock;
> +static __thread int have_tb_lock;
>
>  static void page_table_config_init(void)
>  {


--
Alex Bennée
Emilio Cota July 12, 2017, 6:22 p.m. UTC | #3
On Wed, Jul 12, 2017 at 15:38:28 +0100, Alex Bennée wrote:
> 
> Emilio G. Cota <cota@braap.org> writes:
> 
> > It is only used by this object, and it's not exported to any other.
> >
> > Signed-off-by: Emilio G. Cota <cota@braap.org>
> 
> I was almost caught out by the name re-use in cpu-exec.c ;-)
> 
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

Yes that's very unfortunate. In v2 I'll add a patch to rename it.

Thanks,

		E.
diff mbox

Patch

diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 72ce445..2fa9f65 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -133,7 +133,7 @@  TCGContext tcg_ctx;
 bool parallel_cpus;
 
 /* translation block context */
-__thread int have_tb_lock;
+static __thread int have_tb_lock;
 
 static void page_table_config_init(void)
 {