summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-08 18:10:28 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-08 18:10:28 +0200
commitc49ef50fb9fc5e575c98ecd4d5e00ab148c6676c (patch)
treee3e8865015f759df0d213cb91a22e6ce0b193695 /debian/patches
parentb79b3a5e1947399838c5eb421858b0ca0c4b0292 (diff)
add patch series
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/try-fence0001-pflocal-avoid-nested-function.patch45
-rw-r--r--debian/patches/try-fence0002-libshouldbeinlibc-maptime-use-memory-fences.patch27
3 files changed, 74 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series
index 0f458f68..678ccc7f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -70,3 +70,5 @@ introspection0005-libdiskfs-annotate-objects-managed-by-libports.patch
introspection0006-libpager-annotate-objects-managed-by-libports.patch
introspection0007-ext2fs-annotate-objects-managed-by-libports.patch
introspection0008-utils-rpctrace-support-attaching-to-servers.patch
+try-fence0001-pflocal-avoid-nested-function.patch
+try-fence0002-libshouldbeinlibc-maptime-use-memory-fences.patch
diff --git a/debian/patches/try-fence0001-pflocal-avoid-nested-function.patch b/debian/patches/try-fence0001-pflocal-avoid-nested-function.patch
new file mode 100644
index 00000000..b549ced8
--- /dev/null
+++ b/debian/patches/try-fence0001-pflocal-avoid-nested-function.patch
@@ -0,0 +1,45 @@
+From 001b4a07e03d8882036bea302719ae4a2cb7964d Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Tue, 8 Sep 2015 14:41:39 +0200
+Subject: [PATCH hurd 1/2] pflocal: avoid nested function
+
+* pflocal/io.c (copy_time): Move function out of `S_io_stat', turning
+it into a static inline function.
+---
+ pflocal/io.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/pflocal/io.c b/pflocal/io.c
+index ee6fb84..38d6c1d 100644
+--- a/pflocal/io.c
++++ b/pflocal/io.c
+@@ -298,6 +298,13 @@ S_io_select_timeout (struct sock_user *user,
+ return io_select_common (user, reply, reply_type, &ts, select_type);
+ }
+
++static inline void
++copy_time (time_value_t *from, time_t *to_sec, long *to_nsec)
++{
++ *to_sec = from->seconds;
++ *to_nsec = from->microseconds * 1000;
++}
++
+ /* Return the current status of the object. Not all the fields of the
+ io_statuf_t are meaningful for all objects; however, the access and
+ modify times, the optimal IO size, and the fs type are meaningful
+@@ -308,12 +315,6 @@ S_io_stat (struct sock_user *user, struct stat *st)
+ struct sock *sock;
+ struct pipe *rpipe, *wpipe;
+
+- void copy_time (time_value_t *from, time_t *to_sec, long *to_nsec)
+- {
+- *to_sec = from->seconds;
+- *to_nsec = from->microseconds * 1000;
+- }
+-
+ if (!user)
+ return EOPNOTSUPP;
+
+--
+2.1.4
+
diff --git a/debian/patches/try-fence0002-libshouldbeinlibc-maptime-use-memory-fences.patch b/debian/patches/try-fence0002-libshouldbeinlibc-maptime-use-memory-fences.patch
new file mode 100644
index 00000000..def36b6c
--- /dev/null
+++ b/debian/patches/try-fence0002-libshouldbeinlibc-maptime-use-memory-fences.patch
@@ -0,0 +1,27 @@
+From ba4f680586db72ab9476988c60d0f2e7a429c9a2 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Tue, 8 Sep 2015 12:37:08 +0200
+Subject: [PATCH hurd 2/2] libshouldbeinlibc/maptime: use memory fences
+
+* libshouldbeinlibc/maptime.h (maptime_read): Use memory fences.
+---
+ libshouldbeinlibc/maptime.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libshouldbeinlibc/maptime.h b/libshouldbeinlibc/maptime.h
+index 947ad64..04ce035 100644
+--- a/libshouldbeinlibc/maptime.h
++++ b/libshouldbeinlibc/maptime.h
+@@ -51,7 +51,9 @@ maptime_read (volatile struct mapped_time_value *mtime, struct timeval *tv)
+ do
+ {
+ tv->tv_sec = mtime->seconds;
++ __sync_synchronize ();
+ tv->tv_usec = mtime->microseconds;
++ __sync_synchronize ();
+ }
+ while (tv->tv_sec != mtime->check_seconds);
+ }
+--
+2.1.4
+