Track process uptime

This commit is contained in:
2025-10-16 15:45:36 +02:00
parent 5158305fa6
commit 1a2962de80
5 changed files with 53 additions and 0 deletions

View File

@ -15,6 +15,7 @@
#include "ipc/pipe/pipe.h"
#include "sysdefs/proc.h"
#include "sysdefs/fs.h"
#include "time/time.h"
#define PROC_REAPER_FREQ 30
@ -147,6 +148,8 @@ Proc *proc_spawnuser(char *mountpoint, char *path) {
proc->pipes[1] = dlmalloc(sizeof(IpcPipe));
ipc_pipeinit(proc->pipes[1], proc->pid);
time_get(&proc->time);
return proc;
}

View File

@ -8,6 +8,7 @@
#include "vfs/vfs.h"
#include "ipc/pipe/pipe.h"
#include "sysdefs/proc.h"
#include "sysdefs/time.h"
#include "dev/dev.h"
#define PROC_NAME_MAX 0x100
@ -68,6 +69,8 @@ typedef struct Proc {
} procargs;
uint64_t mman_map_base;
Time time;
} Proc;
typedef struct {