kernel: Use KernelReferenceable for the supplementary_groups array.

Instead of the malloc_referenced system. Makes for some cleaner code,
and the malloc_referenced system was only used here, so it can now be
dropped altogether.
This commit is contained in:
Augustin Cavalier
2022-02-09 16:39:43 -05:00
parent 72acf6a91b
commit e372ec1e02
3 changed files with 25 additions and 24 deletions
+7 -2
View File
@@ -201,6 +201,12 @@ typedef int32 (*thread_entry_func)(thread_func, void *);
namespace BKernel {
struct GroupsArray : KernelReferenceable {
int count;
gid_t groups[];
};
template<typename IDType>
struct TeamThreadIteratorEntry
: DoublyLinkedListLinkImpl<TeamThreadIteratorEntry<IDType> > {
@@ -287,8 +293,7 @@ struct Team : TeamThreadIteratorEntry<team_id>, KernelReferenceable,
gid_t saved_set_gid;
gid_t real_gid;
gid_t effective_gid;
gid_t* supplementary_groups;
int supplementary_group_count;
BReference<GroupsArray> supplementary_groups;
// Exit status information. Set when the first terminal event occurs,
// immutable afterwards. Protected by fLock.