Extended the get_system_info() mechanism; it now gets info about threads/teams
as well as architecture specific stuff. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10313 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
#ifndef _KERNEL_ARCH_SYSTEM_INFO_H
|
||||||
|
#define _KERNEL_ARCH_SYSTEM_INFO_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <OS.h>
|
||||||
|
|
||||||
|
struct kernel_args;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
status_t arch_system_info_init(struct kernel_args *args);
|
||||||
|
status_t arch_get_system_info(system_info *info, size_t size);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _KRENEL_ARCH_SYSTEM_INFO_H */
|
||||||
@@ -1,14 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
** Distributed under the terms of the OpenBeOS License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _KERNEL_SYSTEM_INFO_H
|
#ifndef _KERNEL_SYSTEM_INFO_H
|
||||||
#define _KERNEL_SYSTEM_INFO_H
|
#define _KERNEL_SYSTEM_INFO_H
|
||||||
|
|
||||||
|
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
|
|
||||||
|
struct kernel_args;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern status_t system_info_init(struct kernel_args *args);
|
||||||
extern status_t _user_get_system_info(system_info *userInfo, size_t size);
|
extern status_t _user_get_system_info(system_info *userInfo, size_t size);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _KRENEL_SYSTEM_INFO_H */
|
#endif /* _KRENEL_SYSTEM_INFO_H */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2004, The Haiku Team. All rights reserved.
|
* Copyright 2002-2004, Axel Dörfler, [email protected].
|
||||||
** Distributed under the terms of the Haiku License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _TEAM_H
|
#ifndef _TEAM_H
|
||||||
#define _TEAM_H
|
#define _TEAM_H
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int team_init(kernel_args *ka);
|
status_t team_init(kernel_args *args);
|
||||||
team_id team_create_team(const char *path, const char *name, char **args, int argc,
|
team_id team_create_team(const char *path, const char *name, char **args, int argc,
|
||||||
char **envp, int envc, int priority);
|
char **envp, int envc, int priority);
|
||||||
status_t wait_for_team(team_id id, status_t *returnCode);
|
status_t wait_for_team(team_id id, status_t *returnCode);
|
||||||
@@ -29,6 +29,8 @@ char **user_team_get_arguments(void);
|
|||||||
int user_team_get_arg_count(void);
|
int user_team_get_arg_count(void);
|
||||||
bool team_is_valid(team_id id);
|
bool team_is_valid(team_id id);
|
||||||
struct team *team_get_team_struct_locked(team_id id);
|
struct team *team_get_team_struct_locked(team_id id);
|
||||||
|
int32 team_max_teams(void);
|
||||||
|
int32 team_used_teams(void);
|
||||||
|
|
||||||
// used in syscalls.c
|
// used in syscalls.c
|
||||||
thread_id _user_load_image(int32 argCount, const char **args, int32 envCount, const char **envp, int32 priority);
|
thread_id _user_load_image(int32 argCount, const char **args, int32 envCount, const char **envp, int32 priority);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2002-2004, The OpenBeOS Team. All rights reserved.
|
* Copyright 2002-2004, Axel Dörfler, [email protected].
|
||||||
** Distributed under the terms of the OpenBeOS License.
|
* Distributed under the terms of the MIT License.
|
||||||
**
|
*
|
||||||
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||||
** Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
#ifndef _THREAD_H
|
#ifndef _THREAD_H
|
||||||
#define _THREAD_H
|
#define _THREAD_H
|
||||||
|
|
||||||
@@ -37,6 +37,9 @@ status_t thread_init(kernel_args *ka);
|
|||||||
status_t thread_per_cpu_init(int32 cpu_num);
|
status_t thread_per_cpu_init(int32 cpu_num);
|
||||||
void thread_exit(void);
|
void thread_exit(void);
|
||||||
|
|
||||||
|
int32 thread_max_threads(void);
|
||||||
|
int32 thread_used_threads(void);
|
||||||
|
|
||||||
#define thread_get_current_thread arch_thread_get_current_thread
|
#define thread_get_current_thread arch_thread_get_current_thread
|
||||||
|
|
||||||
struct thread *thread_get_thread_struct(thread_id id);
|
struct thread *thread_get_thread_struct(thread_id id);
|
||||||
|
|||||||
Reference in New Issue
Block a user