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

View File

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

View File

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

View File

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