2004-03-16 05:40:03 +03:00
|
|
|
/*
|
2005-03-11 02:04:48 +03:00
|
|
|
* Copyright 2004-2005, Haiku Inc.
|
2004-12-01 00:06:11 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2004-03-16 05:40:03 +03:00
|
|
|
#ifndef _TEAM_H
|
|
|
|
#define _TEAM_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <OS.h>
|
|
|
|
#include <thread_types.h>
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-12-14 01:22:45 +03:00
|
|
|
status_t team_init(struct kernel_args *args);
|
2004-03-16 05:40:03 +03:00
|
|
|
team_id team_create_team(const char *path, const char *name, char **args, int argc,
|
|
|
|
char **envp, int envc, int priority);
|
|
|
|
status_t wait_for_team(team_id id, status_t *returnCode);
|
2004-10-14 18:34:30 +04:00
|
|
|
void team_remove_team(struct team *team, struct process_group **_freeGroup);
|
2004-03-16 05:40:03 +03:00
|
|
|
void team_delete_team(struct team *team);
|
2006-09-26 16:51:59 +04:00
|
|
|
struct process_group *team_get_process_group_locked(struct process_session *session, pid_t id);
|
2004-10-14 18:34:30 +04:00
|
|
|
void team_delete_process_group(struct process_group *group);
|
2004-03-16 05:40:03 +03:00
|
|
|
struct team *team_get_kernel_team(void);
|
|
|
|
team_id team_get_kernel_team_id(void);
|
|
|
|
team_id team_get_current_team_id(void);
|
2004-10-10 21:26:34 +04:00
|
|
|
status_t team_get_address_space(team_id id, struct vm_address_space **_addressSpace);
|
2004-03-16 05:40:03 +03:00
|
|
|
char **user_team_get_arguments(void);
|
|
|
|
int user_team_get_arg_count(void);
|
|
|
|
bool team_is_valid(team_id id);
|
|
|
|
struct team *team_get_team_struct_locked(team_id id);
|
2004-12-01 00:06:11 +03:00
|
|
|
int32 team_max_teams(void);
|
|
|
|
int32 team_used_teams(void);
|
2004-03-16 05:40:03 +03:00
|
|
|
|
2005-08-03 16:00:42 +04:00
|
|
|
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);
|
|
|
|
|
2004-03-16 05:40:03 +03:00
|
|
|
// used in syscalls.c
|
2005-03-12 18:11:08 +03:00
|
|
|
thread_id _user_load_image(int32 argCount, const char **args, int32 envCount,
|
|
|
|
const char **envp, int32 priority, uint32 flags);
|
2004-03-16 05:40:03 +03:00
|
|
|
status_t _user_wait_for_team(team_id id, status_t *_returnCode);
|
2004-12-01 07:14:55 +03:00
|
|
|
void _user_exit_team(status_t returnValue);
|
2004-03-16 05:40:03 +03:00
|
|
|
status_t _user_kill_team(thread_id thread);
|
2004-09-15 19:42:02 +04:00
|
|
|
thread_id _user_wait_for_child(thread_id child, uint32 flags, int32 *_reason, status_t *_returnCode);
|
|
|
|
status_t _user_exec(const char *path, int32 argc, char * const *argv, int32 envCount, char * const *environment);
|
|
|
|
thread_id _user_fork(void);
|
2004-03-16 05:40:03 +03:00
|
|
|
team_id _user_get_current_team(void);
|
2004-10-14 18:34:30 +04:00
|
|
|
pid_t _user_process_info(pid_t process, int32 which);
|
|
|
|
pid_t _user_setpgid(pid_t process, pid_t group);
|
|
|
|
pid_t _user_setsid(void);
|
2004-03-16 05:40:03 +03:00
|
|
|
|
|
|
|
status_t _user_get_team_info(team_id id, team_info *info);
|
|
|
|
status_t _user_get_next_team_info(int32 *cookie, team_info *info);
|
2004-11-26 00:18:54 +03:00
|
|
|
status_t _user_get_team_usage_info(team_id team, int32 who, team_usage_info *info, size_t size);
|
2004-03-16 05:40:03 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _TIME_H */
|