diff --git a/headers/private/kernel/fd.h b/headers/private/kernel/fd.h index 6d5a35eeb1..84a29ba83b 100644 --- a/headers/private/kernel/fd.h +++ b/headers/private/kernel/fd.h @@ -9,6 +9,7 @@ #include #include #include +#include #ifdef __cplusplus diff --git a/headers/private/kernel/team.h b/headers/private/kernel/team.h new file mode 100644 index 0000000000..a3e485f5cd --- /dev/null +++ b/headers/private/kernel/team.h @@ -0,0 +1,48 @@ +/* +** Copyright 2004, The OpenBeOS Team. All rights reserved. +** Distributed under the terms of the OpenBeOS License. +*/ +#ifndef _TEAM_H +#define _TEAM_H + + +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +int team_init(kernel_args *ka); +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); +void team_remove_team(struct team *team); +void team_delete_team(struct team *team); +struct team *team_get_kernel_team(void); +team_id team_get_kernel_team_id(void); +team_id team_get_current_team_id(void); +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); + +// used in syscalls.c +team_id _user_create_team(const char *path, const char *name, char **args, int argc, char **envp, int envc, int priority); +status_t _user_wait_for_team(team_id id, status_t *_returnCode); +status_t _user_kill_team(thread_id thread); +team_id _user_get_current_team(void); + +status_t _user_get_team_info(team_id id, team_info *info); +status_t _user_get_next_team_info(int32 *cookie, team_info *info); + +// ToDo: please move the "env" setter/getter out of the kernel! +int user_setenv(const char *name, const char *value, int overwrite); +int user_getenv(const char *name, char **value); + +#ifdef __cplusplus +} +#endif + +#endif /* _TIME_H */ diff --git a/headers/private/kernel/thread.h b/headers/private/kernel/thread.h index b39fc75348..eb4ad0c85e 100755 --- a/headers/private/kernel/thread.h +++ b/headers/private/kernel/thread.h @@ -8,15 +8,16 @@ #ifndef _THREAD_H #define _THREAD_H -#ifdef __cplusplus -extern "C" { -#endif #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + void scheduler_reschedule(void); void start_scheduler(void); @@ -53,24 +54,7 @@ thread_get_current_thread_id(void) thread_id spawn_kernel_thread_etc(thread_func, const char *name, int32 priority, void *args, team_id team); -int team_init(kernel_args *ka); -struct team *team_get_kernel_team(void); -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); -void team_remove_team_from_hash(struct team *team); -team_id team_get_kernel_team_id(void); -team_id team_get_current_team_id(void); -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); - // used in syscalls.c -team_id _user_create_team(const char *path, const char *name, char **args, int argc, char **envp, int envc, int priority); -status_t _user_wait_for_team(team_id id, status_t *_returnCode); -status_t _user_kill_team(thread_id thread); -team_id _user_get_current_team(void); - status_t _user_set_thread_priority(thread_id thread, int32 newPriority); status_t _user_suspend_thread(thread_id thread); status_t _user_resume_thread(thread_id thread); @@ -85,17 +69,11 @@ status_t _user_receive_data(thread_id *_sender, void *buffer, size_t buffer_size thread_id _user_find_thread(const char *name); status_t _user_get_thread_info(thread_id id, thread_info *info); status_t _user_get_next_thread_info(team_id team, int32 *cookie, thread_info *info); -status_t _user_get_team_info(team_id id, team_info *info); -status_t _user_get_next_team_info(int32 *cookie, team_info *info); // ToDo: these don't belong here int _user_getrlimit(int resource, struct rlimit * rlp); int _user_setrlimit(int resource, const struct rlimit * rlp); -// ToDo: please move the "env" setter/getter out of the kernel! -int user_setenv(const char *name, const char *value, int overwrite); -int user_getenv(const char *name, char **value); - #if 1 // XXX remove later int thread_test(void);