blob: 80c9e5da331cb77ac0ffbfe8baa6812df5b44c0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/* -------------------------------------------
Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
------------------------------------------- */
/***********************************************************************************/
/// @file UserProcessTeam.cc
/// @brief Process teams implementation.
/***********************************************************************************/
#include <KernelKit/ProcessScheduler.h>
namespace Kernel
{
UserProcessTeam::UserProcessTeam()
{
for (SizeT i = 0U; i < this->mProcessList.Count(); ++i)
{
this->mProcessList[i] = UserProcess();
this->mProcessList[i].PTime = 0;
this->mProcessList[i].Status = ProcessStatusKind::kKilled;
}
this->mProcessCount = 0UL;
}
/***********************************************************************************/
/// @brief UserProcess list array getter.
/// @return The list of process to schedule.
/***********************************************************************************/
Array<UserProcess, kSchedProcessLimitPerTeam>& UserProcessTeam::AsArray()
{
return this->mProcessList;
}
/***********************************************************************************/
/// @brief Get team ID.
/// @return The team's ID.
/***********************************************************************************/
ProcessID& UserProcessTeam::Id() noexcept
{
return this->mTeamId;
}
/***********************************************************************************/
/// @brief Get current process getter as Ref.
/// @return The current process header.
/***********************************************************************************/
Ref<UserProcess>& UserProcessTeam::AsRef()
{
return this->mCurrentProcess;
}
} // namespace Kernel
// last rev 05-03-24
|