diff options
Diffstat (limited to 'debian/patches/try-fence0004-libshouldbeinlibc-maptime-provide-maptime_read_time_.patch')
-rw-r--r-- | debian/patches/try-fence0004-libshouldbeinlibc-maptime-provide-maptime_read_time_.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/debian/patches/try-fence0004-libshouldbeinlibc-maptime-provide-maptime_read_time_.patch b/debian/patches/try-fence0004-libshouldbeinlibc-maptime-provide-maptime_read_time_.patch new file mode 100644 index 00000000..479a334c --- /dev/null +++ b/debian/patches/try-fence0004-libshouldbeinlibc-maptime-provide-maptime_read_time_.patch @@ -0,0 +1,51 @@ +From f4e247b06020b96d41088af4ed053b85bf2c350f Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Tue, 8 Sep 2015 15:16:16 +0200 +Subject: [PATCH hurd 4/5] libshouldbeinlibc/maptime: provide + `maptime_read_time_value' + +* libshouldbeinlibc/maptime.h (maptime_read_time_value): New +declaration and definition of a variant of `maptime_read' that handles +time_value_t. +--- + libshouldbeinlibc/maptime.h | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/libshouldbeinlibc/maptime.h b/libshouldbeinlibc/maptime.h +index d5086b1..e2f9ce8 100644 +--- a/libshouldbeinlibc/maptime.h ++++ b/libshouldbeinlibc/maptime.h +@@ -44,6 +44,8 @@ error_t maptime_map (int use_mach_dev, char *dev_name, + + extern void maptime_read (volatile struct mapped_time_value *mtime, struct timeval *tv); + ++extern void maptime_read_time_value (volatile struct mapped_time_value *mtime, struct time_value *t); ++ + #if defined(__USE_EXTERN_INLINES) || defined(MAPTIME_DEFINE_EI) + + /* Read the current time from MTIME into TV. This should be very fast. */ +@@ -60,6 +62,21 @@ maptime_read (volatile struct mapped_time_value *mtime, struct timeval *tv) + while (tv->tv_sec != mtime->check_seconds); + } + ++/* Read the current time from MTIME into T. This should be very fast. */ ++MAPTIME_EI void ++maptime_read_time_value (volatile struct mapped_time_value *mtime, ++ struct time_value *t) ++{ ++ do ++ { ++ t->seconds = mtime->seconds; ++ __sync_synchronize (); ++ t->microseconds = mtime->microseconds; ++ __sync_synchronize (); ++ } ++ while (t->seconds != mtime->check_seconds); ++} ++ + #endif /* Use extern inlines. */ + + #endif /* __MAPTIME_H__ */ +-- +2.1.4 + |