MCPcopy Create free account
hub / github.com/MemNixFS/MemNixFS / state_name

Function state_name

src/os/linux/task_files.cpp:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74const char* state_name(u32 s) {
75 // include/linux/sched.h
76 switch (s) {
77 case 0x0000: return "R (running)";
78 case 0x0001: return "S (sleeping)";
79 case 0x0002: return "D (disk sleep)";
80 case 0x0004: return "T (stopped)";
81 case 0x0008: return "t (tracing stop)";
82 case 0x0010: return "X (dead)";
83 case 0x0020: return "Z (zombie)";
84 case 0x0040: return "P (parked)";
85 case 0x0080: return "I (idle)";
86 default: return "? (unknown)";
87 }
88}
89
90// Map our Vma flags bitfield back to the rwxp string used by /proc/PID/maps.
91void perm_string(const Vma& v, char buf[5]) {

Callers 1

gen_statusFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected