1 /* 2 ** Copyright 2004, The OpenBeOS Team. All rights reserved. 3 ** Distributed under the terms of the OpenBeOS License. 4 */ 5 #ifndef _TEAM_H 6 #define _TEAM_H 7 8 9 #include <OS.h> 10 #include <thread_types.h> 11 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 int team_init(kernel_args *ka); 18 team_id team_create_team(const char *path, const char *name, char **args, int argc, 19 char **envp, int envc, int priority); 20 status_t wait_for_team(team_id id, status_t *returnCode); 21 void team_remove_team(struct team *team); 22 void team_delete_team(struct team *team); 23 struct team *team_get_kernel_team(void); 24 team_id team_get_kernel_team_id(void); 25 team_id team_get_current_team_id(void); 26 char **user_team_get_arguments(void); 27 int user_team_get_arg_count(void); 28 bool team_is_valid(team_id id); 29 struct team *team_get_team_struct_locked(team_id id); 30 31 // used in syscalls.c 32 team_id _user_create_team(const char *path, const char *name, char **args, int argc, char **envp, int envc, int priority); 33 status_t _user_wait_for_team(team_id id, status_t *_returnCode); 34 status_t _user_kill_team(thread_id thread); 35 team_id _user_get_current_team(void); 36 37 status_t _user_get_team_info(team_id id, team_info *info); 38 status_t _user_get_next_team_info(int32 *cookie, team_info *info); 39 40 // ToDo: please move the "env" setter/getter out of the kernel! 41 int user_setenv(const char *name, const char *value, int overwrite); 42 int user_getenv(const char *name, char **value); 43 44 #ifdef __cplusplus 45 } 46 #endif 47 48 #endif /* _TIME_H */ 49