diff options
author | Petr Machata <pmachata@redhat.com> | 2011-07-09 11:14:11 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2011-10-06 14:17:56 +0200 |
commit | cebb88491e68bdf4d466b03970c9ca77f65615f8 (patch) | |
tree | de0830cb7548a42b9125c31c98b7286c9f3edf4a /common.h | |
parent | c7585b60235268e1f62bd91c5f040ef6df6e0ef3 (diff) | |
download | ltrace-cebb88491e68bdf4d466b03970c9ca77f65615f8.tar.gz |
Conceal the list of processes behind an interface
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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); |