summaryrefslogtreecommitdiffstats
path: root/include/linux/delayacct.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/delayacct.h')
-rw-r--r--include/linux/delayacct.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h
index d955078a144..7e8b6011b8f 100644
--- a/include/linux/delayacct.h
+++ b/include/linux/delayacct.h
@@ -37,6 +37,7 @@ extern void __delayacct_tsk_exit(struct task_struct *);
extern void __delayacct_blkio_start(void);
extern void __delayacct_blkio_end(void);
extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *);
+extern __u64 __delayacct_blkio_ticks(struct task_struct *);
static inline void delayacct_set_flag(int flag)
{
@@ -86,6 +87,13 @@ static inline int delayacct_add_tsk(struct taskstats *d,
return __delayacct_add_tsk(d, tsk);
}
+static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk)
+{
+ if (tsk->delays)
+ return __delayacct_blkio_ticks(tsk);
+ return 0;
+}
+
#else
static inline void delayacct_set_flag(int flag)
{}
@@ -104,6 +112,8 @@ static inline void delayacct_blkio_end(void)
static inline int delayacct_add_tsk(struct taskstats *d,
struct task_struct *tsk)
{ return 0; }
+static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk)
+{ return 0; }
#endif /* CONFIG_TASK_DELAY_ACCT */
#endif