-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf ui: Rename ui_progress to ui_progress_ops
Reserving 'struct ui_progress' to the per progress instances, not to the particular set of operations used to implmenet a progress bar in the current UI (GTK, TUI, etc). Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-zjqbfp9gx3yo45s0rp9uv42n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
- Loading branch information
Arnaldo Carvalho de Melo
committed
Oct 23, 2013
1 parent
74af377
commit 4779a2e
Showing
9 changed files
with
33 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
#include "../cache.h" | ||
#include "progress.h" | ||
|
||
static void nop_progress_update(u64 curr __maybe_unused, | ||
u64 total __maybe_unused, | ||
const char *title __maybe_unused) | ||
static void null_progress__update(u64 curr __maybe_unused, | ||
u64 total __maybe_unused, | ||
const char *title __maybe_unused) | ||
{ | ||
} | ||
|
||
static struct ui_progress default_progress_fns = | ||
static struct ui_progress_ops null_progress__ops = | ||
{ | ||
.update = nop_progress_update, | ||
.update = null_progress__update, | ||
}; | ||
|
||
struct ui_progress *progress_fns = &default_progress_fns; | ||
struct ui_progress_ops *ui_progress__ops = &null_progress__ops; | ||
|
||
void ui_progress__update(u64 curr, u64 total, const char *title) | ||
{ | ||
return progress_fns->update(curr, total, title); | ||
return ui_progress__ops->update(curr, total, title); | ||
} | ||
|
||
void ui_progress__finish(void) | ||
{ | ||
if (progress_fns->finish) | ||
progress_fns->finish(); | ||
if (ui_progress__ops->finish) | ||
ui_progress__ops->finish(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef _PERF_TUI_H_ | ||
#define _PERF_TUI_H_ 1 | ||
|
||
void tui_progress__init(void); | ||
|
||
#endif /* _PERF_TUI_H_ */ |