bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH hurd] Use rpc_time_value_t in user space to avoid build errors


From: Flavio Cruz
Subject: [PATCH hurd] Use rpc_time_value_t in user space to avoid build errors
Date: Sun, 12 Feb 2023 16:54:52 -0500

rpc_time_value_t was introduced in 
https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=5fdc928d3d29fdc93ad00cea5f5c877a19013d44
but it breaks the build. This change fixes it.
---
 libps/spec.c     | 8 ++++----
 procfs/process.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libps/spec.c b/libps/spec.c
index adca2e9c..38ececc1 100644
--- a/libps/spec.c
+++ b/libps/spec.c
@@ -198,7 +198,7 @@ const struct ps_getter ps_max_priority_getter =
 static void
 ps_get_usr_time (struct proc_stat *ps, struct timeval *tv)
 {
-  time_value_t tvt = proc_stat_thread_basic_info (ps)->user_time;
+  rpc_time_value_t tvt = proc_stat_thread_basic_info (ps)->user_time;
   tv->tv_sec = tvt.seconds;
   tv->tv_usec = tvt.microseconds;
 }
@@ -208,7 +208,7 @@ const struct ps_getter ps_usr_time_getter =
 static void
 ps_get_sys_time (struct proc_stat *ps, struct timeval *tv)
 {
-  time_value_t tvt = proc_stat_thread_basic_info (ps)->system_time;
+  rpc_time_value_t tvt = proc_stat_thread_basic_info (ps)->system_time;
   tv->tv_sec = tvt.seconds;
   tv->tv_usec = tvt.microseconds;
 }
@@ -218,7 +218,7 @@ const struct ps_getter ps_sys_time_getter =
 static void
 ps_get_tot_time (struct proc_stat *ps, struct timeval *tv)
 {
-  time_value_t tvt = proc_stat_thread_basic_info (ps)->user_time;
+  rpc_time_value_t tvt = proc_stat_thread_basic_info (ps)->user_time;
   time_value_add (&tvt, &proc_stat_thread_basic_info (ps)->system_time);
   tv->tv_sec = tvt.seconds;
   tv->tv_usec = tvt.microseconds;
@@ -229,7 +229,7 @@ const struct ps_getter ps_tot_time_getter =
 static void
 ps_get_start_time (struct proc_stat *ps, struct timeval *tv)
 {
-  time_value_t *const tvt = &proc_stat_task_basic_info (ps)->creation_time;
+  rpc_time_value_t *const tvt = &proc_stat_task_basic_info (ps)->creation_time;
   tv->tv_sec = tvt->seconds;
   tv->tv_usec = tvt->microseconds;
 }
diff --git a/procfs/process.c b/procfs/process.c
index f608bed6..0ae01db7 100644
--- a/procfs/process.c
+++ b/procfs/process.c
@@ -75,7 +75,7 @@ static const char *state_string (struct proc_stat *ps)
   return "? (unknown)";
 }
 
-static long long int timeval_jiffies (time_value_t tv)
+static long long int timeval_jiffies (rpc_time_value_t tv)
 {
   double secs = tv.seconds * 1000000. + tv.microseconds;
   return secs * opt_clk_tck / 1000000.;
-- 
2.39.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]