progress.h 518 字节
Newer Older
1 2 3
#ifndef _PERF_UI_PROGRESS_H_
#define _PERF_UI_PROGRESS_H_ 1

B
Borislav Petkov 已提交
4
#include <linux/types.h>
5

6
void ui_progress__finish(void);
7

8 9 10 11
struct ui_progress {
	const char *title;
	u64 curr, next, step, total;
};
12

13 14 15
void ui_progress__init(struct ui_progress *p, u64 total, const char *title);
void ui_progress__update(struct ui_progress *p, u64 adv);

16
struct ui_progress_ops {
17
	void (*init)(struct ui_progress *p);
18
	void (*update)(struct ui_progress *p);
N
Namhyung Kim 已提交
19
	void (*finish)(void);
20 21
};

22
extern struct ui_progress_ops *ui_progress__ops;
23

24
#endif