blob: 87d21d677000f6be80cb920cb3a2d54a0361526f (
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 ProcessTeam.cc
/// @brief Process teams implementation.
/***********************************************************************************/
#include <KernelKit/ProcessScheduler.h>
namespace Kernel
{
ProcessTeam::ProcessTeam()
{
for (SizeT i = 0U; i < this->mProcessList.Count(); ++i)
{
this->mProcessList[i] = Process();
this->mProcessList[i].PTime = 0;
this->mProcessList[i].Status = ProcessStatusKind::kKilled;
}
this->mProcessCount = 0UL;
}
/***********************************************************************************/
/// @brief Process list array getter.
/// @return The list of process to schedule.
/***********************************************************************************/
Array<Process, kSchedProcessLimitPerTeam>& ProcessTeam::AsArray()
{
return this->mProcessList;
}
/***********************************************************************************/
/// @brief Get team ID.
/// @return The team's ID.
/***********************************************************************************/
ProcessID& ProcessTeam::Id() noexcept
{
return this->mTeamId;
}
/***********************************************************************************/
/// @brief Get current process getter as Ref.
/// @return The current process header.
/***********************************************************************************/
Ref<Process>& ProcessTeam::AsRef()
{
return this->mCurrentProcess;
}
} // namespace Kernel
// last rev 05-03-24
|