[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 102/108] linux-user: Split out atomic_barrier, ge
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v2 102/108] linux-user: Split out atomic_barrier, gethostname |
Date: |
Sat, 9 Jun 2018 17:02:14 -1000 |
Signed-off-by: Richard Henderson <address@hidden>
---
linux-user/syscall.c | 49 ++++++++++++++++++++++++++------------------
1 file changed, 29 insertions(+), 20 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 91d90c7417..f898e70e98 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7552,6 +7552,14 @@ IMPL(arch_prctl)
}
#endif
+#ifdef TARGET_NR_atomic_barrier
+IMPL(atomic_barrier)
+{
+ /* Like the kernel implementation and the qemu arm barrier, no-op this. */
+ return 0;
+}
+#endif
+
#ifdef TARGET_NR_bind
IMPL(bind)
{
@@ -8987,6 +8995,21 @@ IMPL(getgroups32)
}
#endif
+#ifdef TARGET_NR_gethostname
+IMPL(gethostname)
+{
+ char *name = lock_user(VERIFY_WRITE, arg1, arg2, 0);
+ abi_long ret;
+
+ if (!name) {
+ ret = -TARGET_EFAULT;
+ }
+ ret = get_errno(gethostname(name, arg2));
+ unlock_user(name, arg1, arg2);
+ return ret;
+}
+#endif
+
IMPL(getitimer)
{
struct itimerval value;
@@ -13002,19 +13025,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned
num, abi_long arg1,
abi_long ret;
switch(num) {
-#ifdef TARGET_NR_gethostname
- case TARGET_NR_gethostname:
- {
- char *name = lock_user(VERIFY_WRITE, arg1, arg2, 0);
- if (name) {
- ret = get_errno(gethostname(name, arg2));
- unlock_user(name, arg1, arg2);
- } else {
- ret = -TARGET_EFAULT;
- }
- return ret;
- }
-#endif
#ifdef TARGET_NR_atomic_cmpxchg_32
case TARGET_NR_atomic_cmpxchg_32:
{
@@ -13036,13 +13046,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned
num, abi_long arg1,
return mem_value;
}
#endif
-#ifdef TARGET_NR_atomic_barrier
- case TARGET_NR_atomic_barrier:
- /* Like the kernel implementation and the
- qemu arm barrier, no-op this? */
- return 0;
-#endif
-
#ifdef TARGET_NR_timer_create
case TARGET_NR_timer_create:
{
@@ -13293,6 +13296,9 @@ static impl_fn *syscall_table(unsigned num)
#endif
#ifdef TARGET_NR_bind
SYSCALL(bind);
+#endif
+#ifdef TARGET_NR_atomic_barrier
+ SYSCALL(atomic_barrier);
#endif
SYSCALL(brk);
#ifdef TARGET_NR_cacheflush
@@ -13448,6 +13454,9 @@ static impl_fn *syscall_table(unsigned num)
SYSCALL(getgroups);
#ifdef TARGET_NR_getgroups32
SYSCALL(getgroups32);
+#endif
+#ifdef TARGET_NR_gethostname
+ SYSCALL(gethostname);
#endif
SYSCALL(getitimer);
#ifdef TARGET_NR_getpagesize
--
2.17.1
- [Qemu-devel] [PATCH v2 092/108] linux-user: Split out futex, utimensat, (continued)
- [Qemu-devel] [PATCH v2 092/108] linux-user: Split out futex, utimensat, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 093/108] linux-user: Remove sys_futex, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 094/108] linux-user: Split out inotify syscalls, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 095/108] linux-user: Split out mq syscalls, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 096/108] linux-user: Split out splice, tee, vmsplice, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 097/108] linux-user: Split out eventfd, eventfd2, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 099/108] linux-user: Split out signalfd, signalfd4, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 098/108] linux-user: Split out fallocate, sync_file_range/2, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 100/108] linux-user: Split out epoll syscalls, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 101/108] linux-user: Split out prlimit64, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 102/108] linux-user: Split out atomic_barrier, gethostname,
Richard Henderson <=
- [Qemu-devel] [PATCH v2 103/108] linux-user: Split out atomic_cmpxchg_32, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 104/108] linux-user: Split out timer syscalls, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 105/108] linux-user: Split out timerfd syscalls, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 106/108] linux-user: Split out ioprio_get, ioprio_set, kcmp, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 107/108] linux-user: Split out setns, unshare, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 108/108] linux-user: Fold away do_syscall1, Richard Henderson, 2018/06/09
- Re: [Qemu-devel] [PATCH v2 000/108] linux-user: Split do_syscall, no-reply, 2018/06/10
- Re: [Qemu-devel] [PATCH v2 000/108] linux-user: Split do_syscall, no-reply, 2018/06/10
- Re: [Qemu-devel] [PATCH v2 000/108] linux-user: Split do_syscall, Peter Maydell, 2018/06/10