kernel/team: Allow retrieving more attributes

- Stored the additional start time of each team, expressed by
milliseconds since boot.
- Added more fields to the `team_info` structure. These field
include those provided by the `get_extended_team_info` syscall as
well as the newly introduced `start_time`.
- Extended the `_kern_get_team_info` system call to receive an
additional `size_t` argument. If this size is smaller than or
equal to the size of the old `team_info` structure, the newly
added attributes will not be retrieved.

Change-Id: I22ee6b91ad2ee3b66a7f770036c79a718c5f115c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6390
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jessica Hamilton <[email protected]>
This commit is contained in:
Trung Nguyen
2023-05-17 11:07:14 +00:00
committed by Jessica Hamilton
parent fe3f797dc8
commit b809279cd8
6 changed files with 49 additions and 19 deletions
+2 -2
View File
@@ -80,8 +80,8 @@ 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);
status_t _user_get_team_info(team_id id, team_info *info);
status_t _user_get_next_team_info(int32 *cookie, team_info *info);
status_t _user_get_team_info(team_id id, team_info *info, size_t size);
status_t _user_get_next_team_info(int32 *cookie, team_info *info, size_t size);
status_t _user_get_team_usage_info(team_id team, int32 who,
team_usage_info *info, size_t size);
status_t _user_get_extended_team_info(team_id teamID, uint32 flags,
+2
View File
@@ -275,6 +275,8 @@ struct Team : TeamThreadIteratorEntry<team_id>, KernelReferenceable,
struct team_debug_info debug_info;
bigtime_t start_time;
// protected by time_lock
bigtime_t dead_threads_kernel_time;
bigtime_t dead_threads_user_time;