Added a team watching mechanism in the kernel, not yet tested (but at least doesn't cause any harm yet :-)).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13888 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -32,6 +32,9 @@ struct team *team_get_team_struct_locked(team_id id);
|
||||
int32 team_max_teams(void);
|
||||
int32 team_used_teams(void);
|
||||
|
||||
status_t start_watching_team(team_id team, void (*hook)(team_id, void *), void *data);
|
||||
status_t stop_watching_team(team_id team, void (*hook)(team_id, void *), void *data);
|
||||
|
||||
// used in syscalls.c
|
||||
thread_id _user_load_image(int32 argCount, const char **args, int32 envCount,
|
||||
const char **envp, int32 priority, uint32 flags);
|
||||
|
||||
@@ -78,6 +78,12 @@ struct team_loading_info {
|
||||
bool done; // set when loading is done/aborted
|
||||
};
|
||||
|
||||
struct team_watcher {
|
||||
struct list_link link;
|
||||
void (*hook)(team_id team, void *data);
|
||||
void *data;
|
||||
};
|
||||
|
||||
#define MAX_DEAD_CHILDREN 32
|
||||
// this is a soft limit for the number of dead entries in a team
|
||||
|
||||
@@ -111,6 +117,7 @@ struct team {
|
||||
struct thread *thread_list;
|
||||
struct team_loading_info *loading_info;
|
||||
struct list image_list;
|
||||
struct list watcher_list;
|
||||
struct arch_team arch_info;
|
||||
|
||||
struct team_debug_info debug_info;
|
||||
|
||||
Reference in New Issue
Block a user