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
20static_assert(sizeof(LinuxKernelTimespec) == 16,
21 "Linux amd64 kernel timespec must remain 16 bytes.");
22static_assert(offsetof(LinuxKernelTimespec, tv_sec) == 0 &&
23 offsetof(LinuxKernelTimespec, tv_nsec) == 8,
24 "Linux amd64 kernel timespec fields must remain ABI-aligned.");
25
27 uintptr_t signalMask;
28 size_t signalMaskSize;
29};
30
31static_assert(offsetof(LinuxPselectSigsetArgument, signalMaskSize) == sizeof(uintptr_t),
32 "Linux pselect6 signal argument fields must remain adjacent.");
33#if UINTPTR_MAX == UINT64_MAX
34static_assert(sizeof(LinuxPselectSigsetArgument) == 16,
35 "Linux amd64 pselect6 signal argument must remain 16 bytes.");
36#endif
37
38#endif