mbox series

[v2,0/2] Split out tcg init functions to tcg/startup.h

Message ID 20230930031114.1042913-1-richard.henderson@linaro.org
Headers show
Series Split out tcg init functions to tcg/startup.h | expand

Message

Richard Henderson Sept. 30, 2023, 3:11 a.m. UTC
Supercedes: <20230923130843.3708899-1-peter.maydell@linaro.org>
("[PATCH] tcg.h: Split out runtime-only functions into tcg/runtime.h")

I thought "startup.h" was perhaps a better name than "runtime.h",
at least for the functions moved, since it's about starting up
either tcg or tcg within a new thread.

By removing the argument to tcg_prologue_init(), we can simplify
the users even further, since they no longer require TCGContext.

Adding tcg_init() seems to match the other two as a startup-y
function and allows tcg-all.c to avoid "tcg.h" as well.


r~


Richard Henderson (2):
  tcg: Remove argument to tcg_prologue_init
  tcg: Split out tcg init functions to tcg/startup.h

 include/tcg/startup.h           | 58 +++++++++++++++++++++++++++++++++
 include/tcg/tcg.h               |  3 --
 accel/tcg/tcg-accel-ops-mttcg.c |  2 +-
 accel/tcg/tcg-accel-ops-rr.c    |  2 +-
 accel/tcg/tcg-all.c             |  4 +--
 bsd-user/main.c                 |  4 +--
 linux-user/main.c               |  4 +--
 linux-user/syscall.c            |  2 +-
 tcg/tcg.c                       |  4 ++-
 9 files changed, 70 insertions(+), 13 deletions(-)
 create mode 100644 include/tcg/startup.h

Comments

Philippe Mathieu-Daudé Oct. 2, 2023, 12:51 p.m. UTC | #1
On 30/9/23 05:11, Richard Henderson wrote:
> Supercedes: <20230923130843.3708899-1-peter.maydell@linaro.org>
> ("[PATCH] tcg.h: Split out runtime-only functions into tcg/runtime.h")
> 
> I thought "startup.h" was perhaps a better name than "runtime.h",
> at least for the functions moved, since it's about starting up
> either tcg or tcg within a new thread.
> 
> By removing the argument to tcg_prologue_init(), we can simplify
> the users even further, since they no longer require TCGContext.
> 
> Adding tcg_init() seems to match the other two as a startup-y
> function and allows tcg-all.c to avoid "tcg.h" as well.
> 
> 
> r~
> 
> 
> Richard Henderson (2):
>    tcg: Remove argument to tcg_prologue_init
>    tcg: Split out tcg init functions to tcg/startup.h

Series:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>