The Pedigree Project
0.1
src
modules
subsys
posix
process-accounting.h
1
/* Copyright (c) 2026, Pedigree Developers. */
2
#ifndef POSIX_PROCESS_ACCOUNTING_H
3
#define POSIX_PROCESS_ACCOUNTING_H
4
5
#include "pedigree/kernel/time/Time.h"
6
7
class
PosixProcess
;
8
9
struct
ProcessAccountingLifetime
{
10
explicit
ProcessAccountingLifetime
(
bool
fromFork =
false
)
11
: birth(Time::getTimeNanoseconds()), started(Time::getTicks()), forked(fromFork) {}
12
const
Time::Timestamp birth;
13
const
Time::Timestamp started;
14
const
bool
forked;
15
uint64_t virtualKilobytes = 0;
16
};
17
18
int
posix_acct(
const
char
* path);
19
void
posix_account_process_exit(
PosixProcess
& process,
const
ProcessAccountingLifetime
& lifetime);
20
void
posix_stop_accounting();
21
22
#endif
PosixProcess
Definition
PosixProcess.h:115
ProcessAccountingLifetime
Definition
process-accounting.h:9
Generated on Tue Sep 29 2026 04:30:09 for The Pedigree Project by
1.9.8