From f7674e54ccb92a1b99af6e930bab75560ff2dfd7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 24 Oct 2008 12:32:36 -0700 Subject: Fix hrtimer.expires name change. The field is renamed to _expires starting in 2.6.28-rc1, and it's not meant to be directly manipulated. Instead hrtimer users are supposed to use hrtimer_get_expires and hrtimer_set_expires. --- tapsets.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index a5cde7ce..d71b2367 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -8729,10 +8729,15 @@ hrtimer_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline() << "if ((atomic_read (&session_state) == STAP_SESSION_STARTING) ||"; s.op->newline() << " (atomic_read (&session_state) == STAP_SESSION_RUNNING)) {"; // Compute next trigger time - s.op->newline(1) << "timer->expires = ktime_add (timer->expires,"; + s.op->newline(1) << "#ifdef STAPCONF_HRTIMER_GETSET_EXPIRES"; + s.op->newline() << "hrtimer_set_expires(timer, ktime_add (hrtimer_get_expires(timer),"; + s.op->newline() << "#else"; + s.op->newline() << "timer->expires = (ktime_add (timer->expires,"; + s.op->newline() << "#endif"; + s.op->newline(1); emit_interval (s.op); - s.op->line() << ");"; - s.op->newline() << "rc = HRTIMER_RESTART;"; + s.op->line() << "));"; + s.op->newline(-1) << "rc = HRTIMER_RESTART;"; s.op->newline(-1) << "}"; s.op->newline() << "{"; s.op->indent(1); -- cgit