summaryrefslogtreecommitdiff
path: root/tools/perf/ui/progress.c
blob: d753821b6e0bf68b6943efea6e992ec0d5e465df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "../cache.h"
#include "progress.h"

static void null_progress__update(u64 curr __maybe_unused,
				  u64 total __maybe_unused,
				  const char *title __maybe_unused)
{
}

static struct ui_progress_ops null_progress__ops =
{
	.update = null_progress__update,
};

struct ui_progress_ops *ui_progress__ops = &null_progress__ops;

void ui_progress__update(u64 curr, u64 total, const char *title)
{
	return ui_progress__ops->update(curr, total, title);
}

void ui_progress__finish(void)
{
	if (ui_progress__ops->finish)
		ui_progress__ops->finish();
}