diff options
Diffstat (limited to 'tools/perf/util/run-command.h')
| -rw-r--r-- | tools/perf/util/run-command.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/perf/util/run-command.h b/tools/perf/util/run-command.h index d79028727ce2..1ef264d5069c 100644 --- a/tools/perf/util/run-command.h +++ b/tools/perf/util/run-command.h | |||
| @@ -50,39 +50,9 @@ int start_command(struct child_process *); | |||
| 50 | int finish_command(struct child_process *); | 50 | int finish_command(struct child_process *); |
| 51 | int run_command(struct child_process *); | 51 | int run_command(struct child_process *); |
| 52 | 52 | ||
| 53 | extern int run_hook(const char *index_file, const char *name, ...); | ||
| 54 | |||
| 55 | #define RUN_COMMAND_NO_STDIN 1 | 53 | #define RUN_COMMAND_NO_STDIN 1 |
| 56 | #define RUN_PERF_CMD 2 /*If this is to be perf sub-command */ | 54 | #define RUN_PERF_CMD 2 /*If this is to be perf sub-command */ |
| 57 | #define RUN_COMMAND_STDOUT_TO_STDERR 4 | 55 | #define RUN_COMMAND_STDOUT_TO_STDERR 4 |
| 58 | int run_command_v_opt(const char **argv, int opt); | 56 | int run_command_v_opt(const char **argv, int opt); |
| 59 | 57 | ||
| 60 | /* | ||
| 61 | * env (the environment) is to be formatted like environ: "VAR=VALUE". | ||
| 62 | * To unset an environment variable use just "VAR". | ||
| 63 | */ | ||
| 64 | int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const char *const *env); | ||
| 65 | |||
| 66 | /* | ||
| 67 | * The purpose of the following functions is to feed a pipe by running | ||
| 68 | * a function asynchronously and providing output that the caller reads. | ||
| 69 | * | ||
| 70 | * It is expected that no synchronization and mutual exclusion between | ||
| 71 | * the caller and the feed function is necessary so that the function | ||
| 72 | * can run in a thread without interfering with the caller. | ||
| 73 | */ | ||
| 74 | struct async { | ||
| 75 | /* | ||
| 76 | * proc writes to fd and closes it; | ||
| 77 | * returns 0 on success, non-zero on failure | ||
| 78 | */ | ||
| 79 | int (*proc)(int fd, void *data); | ||
| 80 | void *data; | ||
| 81 | int out; /* caller reads from here and closes it */ | ||
| 82 | pid_t pid; | ||
| 83 | }; | ||
| 84 | |||
| 85 | int start_async(struct async *async); | ||
| 86 | int finish_async(struct async *async); | ||
| 87 | |||
| 88 | #endif /* __PERF_RUN_COMMAND_H */ | 58 | #endif /* __PERF_RUN_COMMAND_H */ |
