aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2011-07-09 11:14:11 +0200
committerPetr Machata <pmachata@redhat.com>2011-10-06 14:17:56 +0200
commitcebb88491e68bdf4d466b03970c9ca77f65615f8 (patch)
treede0830cb7548a42b9125c31c98b7286c9f3edf4a /common.h
parentc7585b60235268e1f62bd91c5f040ef6df6e0ef3 (diff)
downloadltrace-cebb88491e68bdf4d466b03970c9ca77f65615f8.tar.gz
Conceal the list of processes behind an interface
Diffstat (limited to 'common.h')
-rw-r--r--common.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/common.h b/common.h
index a7234a5..f34a99d 100644
--- a/common.h
+++ b/common.h
@@ -217,10 +217,18 @@ struct opt_c_struct {
extern Dict * dict_opt_c;
-extern Process * list_of_processes;
+enum pcb_status {
+ pcb_stop, /* The iteration should stop. */
+ pcb_cont, /* The iteration should continue. */
+};
extern Event * next_event(void);
extern Process * pid2proc(pid_t pid);
+extern void add_process(Process * proc);
+extern void remove_process(Process * proc);
+extern Process *each_process(Process * start,
+ enum pcb_status (* cb)(Process * proc, void * data),
+ void * data);
extern void handle_event(Event * event);
extern pid_t execute_program(const char * command, char ** argv);
extern int display_arg(enum tof type, Process * proc, int arg_num, arg_type_info * info);