The Pedigree Project
0.1
src
modules
subsys
posix
wait-state.h
1
/* Copyright (c) 2026, Pedigree Developers. */
2
#ifndef PEDIGREE_POSIX_WAIT_STATE_H
3
#define PEDIGREE_POSIX_WAIT_STATE_H
4
5
#include <stdint.h>
6
7
namespace
PosixWait {
8
enum class
Selector { All, Pid, Pgid };
9
enum
Event
:
unsigned
{ Exited = 1, Stopped = 2, Continued = 4 };
10
enum
Cause : int32_t { Exit = 1, Killed = 2, Dumped = 3, Trapped = 4, Stop = 5, Continue = 6 };
11
12
struct
Request
{
13
Selector selector = Selector::All;
14
int32_t
id
= 0;
15
unsigned
events = Exited;
16
bool
noHang =
false
;
17
bool
noWait =
false
;
18
bool
traceStops =
false
;
19
};
20
21
struct
Report
{
22
int32_t pid = 0;
23
int32_t cause = 0;
24
int32_t status = 0;
25
uint32_t uid = 0;
26
uint64_t userNanoseconds = 0;
27
uint64_t kernelNanoseconds = 0;
28
};
29
30
// Returns one report, zero for WNOHANG, or -1 with errno. No lifetime claim
31
// escapes: consuming calls publish the sole reaper before user copyout.
32
int
collect(
const
Request
& request,
Report
& report);
33
}
// namespace PosixWait
34
#endif
Event
Definition
Event.h:49
PosixWait::Report
Definition
wait-state.h:21
PosixWait::Request
Definition
wait-state.h:12
Generated on Thu Sep 24 2026 06:23:59 for The Pedigree Project by
1.9.8