task: Implement new process state

Added "Frozen" for vfork implementation.
This commit is contained in:
EnderIce2 2024-10-20 03:00:34 +03:00
parent 53360c10e2
commit f57ad7fc81
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
4 changed files with 20 additions and 1 deletions

View File

@ -525,6 +525,7 @@ nsa void DisplayProcessScreen(CPU::ExceptionFrame *Frame, bool IgnoreReady = tru
"35m", // Core dump "35m", // Core dump
"1;31m", // Zombie "1;31m", // Zombie
"31m", // Terminated "31m", // Terminated
"1;33m", // Frozen
}; };
const char *StatusString[] = { const char *StatusString[] = {
@ -539,6 +540,7 @@ nsa void DisplayProcessScreen(CPU::ExceptionFrame *Frame, bool IgnoreReady = tru
"CRD", // Core dump "CRD", // Core dump
"ZMB", // Zombie "ZMB", // Zombie
"TRM", // Terminated "TRM", // Terminated
"FRZ", // Frozen
}; };
if (!TaskManager) if (!TaskManager)

View File

@ -170,8 +170,15 @@ namespace Tasking
*/ */
Terminated, Terminated,
/**
* Frozen
*
* Used internally by the kernel
*/
Frozen,
_StatusMin = UnknownStatus, _StatusMin = UnknownStatus,
_StatusMax = Terminated _StatusMax = Frozen
}; };
enum TaskPriority enum TaskPriority
@ -475,6 +482,12 @@ namespace Tasking
TaskInfo Info{}; TaskInfo Info{};
ThreadLocalStorage TLS{}; ThreadLocalStorage TLS{};
struct
{
bool vforked = false;
TCB *CallingThread = nullptr;
} Linux{};
/* Filesystem */ /* Filesystem */
FileNode *CWD; FileNode *CWD;
FileNode *Executable; FileNode *Executable;

View File

@ -37,6 +37,7 @@ const char *TaskStateStrings[] = {
"CoreDump", // Core dump "CoreDump", // Core dump
"Zombie", // Zombie "Zombie", // Zombie
"Terminated", // Terminated "Terminated", // Terminated
"Frozen", // Frozen
}; };
void cmd_top(const char *) void cmd_top(const char *)

View File

@ -32,6 +32,8 @@ const char *Statuses[] = {
"FF0088", /* Zombie */ "FF0088", /* Zombie */
"FF0000", /* Terminated */ "FF0000", /* Terminated */
"FF8800", /* Frozen */
}; };
const char *StatusesSign[] = { const char *StatusesSign[] = {
@ -46,6 +48,7 @@ const char *StatusesSign[] = {
"Core", "Core",
"Zombie", "Zombie",
"Terminated", "Terminated",
"Frozen",
}; };
const char *SuccessSourceStrings[] = { const char *SuccessSourceStrings[] = {