/* * Account how much elapsed time was spent in steal, irq, or softirq time. */ static inline u64 account_other_time(u64 max) { u64 accounted; lockdep_assert_irqs_disabled(); accounted = steal_account_process_time(max); if (accounted < max) accounted += irqtime_tick_accounted(max - accounted); return accounted; }
/* * Account how much elapsed time was spent in steal, irq, or softirq time. */ static inline cputime_t account_other_time(cputime_t max) { cputime_t accounted; /* Shall be converted to a lockdep-enabled lightweight check */ WARN_ON_ONCE(!irqs_disabled()); accounted = steal_account_process_time(max); if (accounted < max) accounted += irqtime_account_hi_update(max - accounted); if (accounted < max) accounted += irqtime_account_si_update(max - accounted); return accounted; }