diff mbox series

[v5,14/17] common-user: Move safe-syscall.* from linux-user

Message ID 20211117160412.71563-15-richard.henderson@linaro.org
State New
Headers show
Series linux-user: simplify safe signal handling | expand

Commit Message

Richard Henderson Nov. 17, 2021, 4:04 p.m. UTC
Move linux-user/safe-syscall.S to common-user so that bsd-user
can also use it.  Also move safe-syscall.h to include/user/.
Since there is nothing here that is related to the guest, as
opposed to the host, build it once.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 {linux-user => include/user}/safe-syscall.h | 0
 linux-user/signal.c                         | 2 +-
 linux-user/syscall.c                        | 2 +-
 common-user/meson.build                     | 2 ++
 {linux-user => common-user}/safe-syscall.S  | 0
 linux-user/meson.build                      | 1 -
 6 files changed, 4 insertions(+), 3 deletions(-)
 rename {linux-user => include/user}/safe-syscall.h (100%)
 rename {linux-user => common-user}/safe-syscall.S (100%)

Comments

Warner Losh Nov. 17, 2021, 5:23 p.m. UTC | #1
On Wed, Nov 17, 2021 at 9:04 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> Move linux-user/safe-syscall.S to common-user so that bsd-user
> can also use it.  Also move safe-syscall.h to include/user/.
> Since there is nothing here that is related to the guest, as
> opposed to the host, build it once.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  {linux-user => include/user}/safe-syscall.h | 0
>  linux-user/signal.c                         | 2 +-
>  linux-user/syscall.c                        | 2 +-
>  common-user/meson.build                     | 2 ++
>  {linux-user => common-user}/safe-syscall.S  | 0
>  linux-user/meson.build                      | 1 -
>  6 files changed, 4 insertions(+), 3 deletions(-)
>  rename {linux-user => include/user}/safe-syscall.h (100%)
>  rename {linux-user => common-user}/safe-syscall.S (100%)
>

Reviewed-by: Warner Losh <imp@bsdimp.com>


> diff --git a/linux-user/safe-syscall.h b/include/user/safe-syscall.h
> similarity index 100%
> rename from linux-user/safe-syscall.h
> rename to include/user/safe-syscall.h
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 12b1705287..510db73c34 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -31,7 +31,7 @@
>  #include "trace.h"
>  #include "signal-common.h"
>  #include "host-signal.h"
> -#include "safe-syscall.h"
> +#include "user/safe-syscall.h"
>
>  static struct target_sigaction sigact_table[TARGET_NSIG];
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 33d342157d..53deb887ca 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -132,7 +132,7 @@
>  #include "signal-common.h"
>  #include "loader.h"
>  #include "user-mmap.h"
> -#include "safe-syscall.h"
> +#include "user/safe-syscall.h"
>  #include "qemu/guest-random.h"
>  #include "qemu/selfmap.h"
>  #include "user/syscall-trace.h"
> diff --git a/common-user/meson.build b/common-user/meson.build
> index 4f5c0f2f88..c02b5d9cc2 100644
> --- a/common-user/meson.build
> +++ b/common-user/meson.build
> @@ -1 +1,3 @@
>  common_user_inc += include_directories('host/' / config_host['ARCH'])
> +
> +common_user_ss.add(files('safe-syscall.S'))
> diff --git a/linux-user/safe-syscall.S b/common-user/safe-syscall.S
> similarity index 100%
> rename from linux-user/safe-syscall.S
> rename to common-user/safe-syscall.S
> diff --git a/linux-user/meson.build b/linux-user/meson.build
> index d6fa4f4d74..bf9d945504 100644
> --- a/linux-user/meson.build
> +++ b/linux-user/meson.build
> @@ -12,7 +12,6 @@ linux_user_ss.add(files(
>    'linuxload.c',
>    'main.c',
>    'mmap.c',
> -  'safe-syscall.S',
>    'signal.c',
>    'strace.c',
>    'syscall.c',
> --
> 2.25.1
>
>
diff mbox series

Patch

diff --git a/linux-user/safe-syscall.h b/include/user/safe-syscall.h
similarity index 100%
rename from linux-user/safe-syscall.h
rename to include/user/safe-syscall.h
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 12b1705287..510db73c34 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -31,7 +31,7 @@ 
 #include "trace.h"
 #include "signal-common.h"
 #include "host-signal.h"
-#include "safe-syscall.h"
+#include "user/safe-syscall.h"
 
 static struct target_sigaction sigact_table[TARGET_NSIG];
 
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 33d342157d..53deb887ca 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -132,7 +132,7 @@ 
 #include "signal-common.h"
 #include "loader.h"
 #include "user-mmap.h"
-#include "safe-syscall.h"
+#include "user/safe-syscall.h"
 #include "qemu/guest-random.h"
 #include "qemu/selfmap.h"
 #include "user/syscall-trace.h"
diff --git a/common-user/meson.build b/common-user/meson.build
index 4f5c0f2f88..c02b5d9cc2 100644
--- a/common-user/meson.build
+++ b/common-user/meson.build
@@ -1 +1,3 @@ 
 common_user_inc += include_directories('host/' / config_host['ARCH'])
+
+common_user_ss.add(files('safe-syscall.S'))
diff --git a/linux-user/safe-syscall.S b/common-user/safe-syscall.S
similarity index 100%
rename from linux-user/safe-syscall.S
rename to common-user/safe-syscall.S
diff --git a/linux-user/meson.build b/linux-user/meson.build
index d6fa4f4d74..bf9d945504 100644
--- a/linux-user/meson.build
+++ b/linux-user/meson.build
@@ -12,7 +12,6 @@  linux_user_ss.add(files(
   'linuxload.c',
   'main.c',
   'mmap.c',
-  'safe-syscall.S',
   'signal.c',
   'strace.c',
   'syscall.c',