qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Declare code_gen_ptr, code_gen_max_blocks 'static'
@ 2010-07-19 16:23 Stefan Weil
  2010-07-22 12:16 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2010-07-19 16:23 UTC (permalink / raw)
  To: QEMU Developers

Both values are only used in exec.c, so there is no need
to make them globally available.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 exec-all.h |    2 --
 exec.c     |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/exec-all.h b/exec-all.h
index a775582..58b5575 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -191,8 +191,6 @@ void tb_link_page(TranslationBlock *tb,
 void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
 
 extern TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
-extern uint8_t *code_gen_ptr;
-extern int code_gen_max_blocks;
 
 #if defined(USE_DIRECT_JUMP)
 
diff --git a/exec.c b/exec.c
index 4641b3e..868cd7f 100644
--- a/exec.c
+++ b/exec.c
@@ -80,7 +80,7 @@
 #define SMC_BITMAP_USE_THRESHOLD 10
 
 static TranslationBlock *tbs;
-int code_gen_max_blocks;
+static int code_gen_max_blocks;
 TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
 static int nb_tbs;
 /* any access to the tbs or the page table must use this lock */
@@ -107,7 +107,7 @@ static uint8_t *code_gen_buffer;
 static unsigned long code_gen_buffer_size;
 /* threshold to flush the translated code buffer */
 static unsigned long code_gen_buffer_max_size;
-uint8_t *code_gen_ptr;
+static uint8_t *code_gen_ptr;
 
 #if !defined(CONFIG_USER_ONLY)
 int phys_ram_fd;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] Declare code_gen_ptr, code_gen_max_blocks 'static'
  2010-07-19 16:23 [Qemu-devel] [PATCH] Declare code_gen_ptr, code_gen_max_blocks 'static' Stefan Weil
@ 2010-07-22 12:16 ` Aurelien Jarno
  0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2010-07-22 12:16 UTC (permalink / raw)
  To: Stefan Weil; +Cc: QEMU Developers

On Mon, Jul 19, 2010 at 06:23:17PM +0200, Stefan Weil wrote:
> Both values are only used in exec.c, so there is no need
> to make them globally available.
> 
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
>  exec-all.h |    2 --
>  exec.c     |    4 ++--
>  2 files changed, 2 insertions(+), 4 deletions(-)

Thanks, applied.

> diff --git a/exec-all.h b/exec-all.h
> index a775582..58b5575 100644
> --- a/exec-all.h
> +++ b/exec-all.h
> @@ -191,8 +191,6 @@ void tb_link_page(TranslationBlock *tb,
>  void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
>  
>  extern TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
> -extern uint8_t *code_gen_ptr;
> -extern int code_gen_max_blocks;
>  
>  #if defined(USE_DIRECT_JUMP)
>  
> diff --git a/exec.c b/exec.c
> index 4641b3e..868cd7f 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -80,7 +80,7 @@
>  #define SMC_BITMAP_USE_THRESHOLD 10
>  
>  static TranslationBlock *tbs;
> -int code_gen_max_blocks;
> +static int code_gen_max_blocks;
>  TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
>  static int nb_tbs;
>  /* any access to the tbs or the page table must use this lock */
> @@ -107,7 +107,7 @@ static uint8_t *code_gen_buffer;
>  static unsigned long code_gen_buffer_size;
>  /* threshold to flush the translated code buffer */
>  static unsigned long code_gen_buffer_max_size;
> -uint8_t *code_gen_ptr;
> +static uint8_t *code_gen_ptr;
>  
>  #if !defined(CONFIG_USER_ONLY)
>  int phys_ram_fd;
> -- 
> 1.7.1
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-22 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-19 16:23 [Qemu-devel] [PATCH] Declare code_gen_ptr, code_gen_max_blocks 'static' Stefan Weil
2010-07-22 12:16 ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).