The Pedigree Project 0.1
linux-wait-abi.h
1/*
2 * Copyright (c) 2026, Pedigree Developers
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 */
8
9#ifndef LINUX_WAIT_ABI_H
10#define LINUX_WAIT_ABI_H
11
12#include <stddef.h>
13#include <stdint.h>
14
16 int64_t tv_sec;
17 int64_t tv_nsec;
18};
19
21 int32_t tv_sec;
22 int32_t tv_nsec;
23};
24
25static_assert(sizeof(LinuxKernelTimespec32) == 8,
26 "Linux time32 kernel timespec must remain 8 bytes.");
27
28static_assert(sizeof(LinuxKernelTimespec) == 16,
29 "Linux amd64 kernel timespec must remain 16 bytes.");
30static_assert(offsetof(LinuxKernelTimespec, tv_sec) == 0 &&
31 offsetof(LinuxKernelTimespec, tv_nsec) == 8,
32 "Linux amd64 kernel timespec fields must remain ABI-aligned.");
33
35 uintptr_t signalMask;
36 size_t signalMaskSize;
37};
38
39static_assert(offsetof(LinuxPselectSigsetArgument, signalMaskSize) == sizeof(uintptr_t),
40 "Linux pselect6 signal argument fields must remain adjacent.");
41#if UINTPTR_MAX == UINT64_MAX
42static_assert(sizeof(LinuxPselectSigsetArgument) == 16,
43 "Linux amd64 pselect6 signal argument must remain 16 bytes.");
44#endif
45
46#endif