summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2014-11-03 19:25:57 +0000
committerJuergen Lock <nox@FreeBSD.org>2014-11-03 19:25:57 +0000
commita97f5a8805ec2c4810156da1b643a80e9017bc33 (patch)
tree83c143490297b5be842dc6e222324212e5728695 /emulators/qemu-devel/files
parentUpdate to version 5.10 (diff)
- bsd-user: deal with new sem_wait2 and sem_wake2 syscalls in head.
- Bump PORTREVISION. Submitted by: sbruno Obtained from: https://github.com/seanbruno/qemu-bsd-user/commit/2478a4e4a33d0523cc436eabb4a27b258b4358b8
Notes
Notes: svn path=/head/; revision=372121
Diffstat (limited to 'emulators/qemu-devel/files')
-rw-r--r--emulators/qemu-devel/files/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b880
-rw-r--r--emulators/qemu-devel/files/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b8-before1119
2 files changed, 99 insertions, 0 deletions
diff --git a/emulators/qemu-devel/files/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b8 b/emulators/qemu-devel/files/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b8
new file mode 100644
index 000000000000..60acfebd6da6
--- /dev/null
+++ b/emulators/qemu-devel/files/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b8
@@ -0,0 +1,80 @@
+From 2478a4e4a33d0523cc436eabb4a27b258b4358b8 Mon Sep 17 00:00:00 2001
+From: Sean Bruno <sbruno@freebsd.org>
+Date: Sun, 2 Nov 2014 15:05:40 -0800
+Subject: [PATCH] Deal with new sem_wait2 and sem_wake2 syscalls in head.
+
+---
+ bsd-user/freebsd/os-thread.c | 19 +++++++++++++++++++
+ bsd-user/freebsd/os-thread.h | 6 ++++++
+ bsd-user/syscall_defs.h | 4 +++-
+ 3 files changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/bsd-user/freebsd/os-thread.c b/bsd-user/freebsd/os-thread.c
+index 91a42ac..cca46cf 100644
+--- a/bsd-user/freebsd/os-thread.c
++++ b/bsd-user/freebsd/os-thread.c
+@@ -225,6 +225,25 @@ abi_long freebsd_umtx_mutex_wake2(abi_ulong target_addr,
+ }
+ #endif /* UMTX_OP_MUTEX_WAKE2 */
+
++#if defined(__FreeBSD_version) && __FreeBSD_version > 1100000
++abi_long freebsd_umtx_sem_wait(abi_ulong obj, struct timespec *timeout)
++{
++
++ /* XXX Assumes struct _usem is opauque to the user */
++ if (!access_ok(VERIFY_WRITE, obj, sizeof(struct target__usem))) {
++ return -TARGET_EFAULT;
++ }
++ return get_errno(_umtx_op(g2h(obj), UMTX_OP_SEM2_WAIT, 0, NULL, timeout));
++}
++
++abi_long freebsd_umtx_sem_wake(abi_ulong obj, uint32_t val)
++{
++
++ return get_errno(_umtx_op(g2h(obj), UMTX_OP_SEM2_WAKE, val, NULL, NULL));
++}
++#endif
++
++#else
+ abi_long freebsd_umtx_sem_wait(abi_ulong obj, struct timespec *timeout)
+ {
+
+diff --git a/bsd-user/freebsd/os-thread.h b/bsd-user/freebsd/os-thread.h
+index 28f737f..8157e85 100644
+--- a/bsd-user/freebsd/os-thread.h
++++ b/bsd-user/freebsd/os-thread.h
+@@ -486,6 +486,9 @@ static inline abi_long do_freebsd__umtx_op(abi_ulong obj, int op, abi_ulong val,
+ break;
+ #endif /* UMTX_OP_NWAKE_PRIVATE */
+
++#if defined(__FreeBSD_version) && __FreeBSD_version > 1100000
++ case TARGET_UMTX_OP_SEM2_WAIT:
++#endif
+ case TARGET_UMTX_OP_SEM_WAIT:
+ if (target_ts != 0) {
+ if (t2h_freebsd_timespec(&ts, target_ts)) {
+@@ -497,6 +500,9 @@ static inline abi_long do_freebsd__umtx_op(abi_ulong obj, int op, abi_ulong val,
+ }
+ break;
+
++#if defined(__FreeBSD_version) && __FreeBSD_version > 1100000
++ case TARGET_UMTX_OP_SEM2_WAKE:
++#endif
+ case TARGET_UMTX_OP_SEM_WAKE:
+ /* Don't need to do access_ok(). */
+ ret = freebsd_umtx_sem_wake(obj, val);
+diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h
+index 13678d4..d02476c 100644
+--- a/bsd-user/syscall_defs.h
++++ b/bsd-user/syscall_defs.h
+@@ -633,7 +633,9 @@ typedef struct {
+ #define TARGET_UMTX_OP_SEM_WAKE 20
+ #define TARGET_UMTX_OP_NWAKE_PRIVATE 21
+ #define TARGET_UMTX_OP_MUTEX_WAKE2 22
+-#define TARGET_UMTX_OP_MAX 23
++#define TARGET_UMTX_OP_SEM2_WAIT 23
++#define TARGET_UMTX_OP_SEM2_WAKE 24
++#define TARGET_UMTX_OP_MAX 25
+
+ /* flags for UMTX_OP_CV_WAIT */
+ #define TARGET_CVWAIT_CHECK_UNPARKING 0x01
diff --git a/emulators/qemu-devel/files/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b8-before11 b/emulators/qemu-devel/files/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b8-before11
new file mode 100644
index 000000000000..d0746ba545b2
--- /dev/null
+++ b/emulators/qemu-devel/files/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b8-before11
@@ -0,0 +1,19 @@
+--- a/bsd-user/freebsd/os-thread.c
++++ b/bsd-user/freebsd/os-thread.c
+@@ -241,8 +241,6 @@ abi_long freebsd_umtx_sem_wake(abi_ulong
+
+ return get_errno(_umtx_op(g2h(obj), UMTX_OP_SEM2_WAKE, val, NULL, NULL));
+ }
+-#endif
+-
+ #else
+ abi_long freebsd_umtx_sem_wait(abi_ulong obj, struct timespec *timeout)
+ {
+@@ -260,6 +258,7 @@ abi_long freebsd_umtx_sem_wake(abi_ulong
+ return get_errno(_umtx_op(g2h(obj), UMTX_OP_SEM_WAKE, val, NULL, NULL));
+ }
+ #endif
++#endif
+
+ abi_long t2h_freebsd_rtprio(struct rtprio *host_rtp, abi_ulong target_addr)
+ {