2020-01-18 03:38:21 -05:00
|
|
|
/*
|
2021-08-14 10:03:38 -04:00
|
|
|
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
2020-01-18 03:38:21 -05:00
|
|
|
*
|
2021-04-22 04:24:48 -04:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 03:38:21 -05:00
|
|
|
*/
|
|
|
|
|
2018-10-14 16:57:41 -04:00
|
|
|
#pragma once
|
|
|
|
|
2020-08-08 11:32:34 -04:00
|
|
|
#include <AK/DistinctNumeric.h>
|
2019-04-06 08:29:29 -04:00
|
|
|
#include <AK/Types.h>
|
2021-08-14 12:52:14 -04:00
|
|
|
#include <Kernel/API/POSIX/dirent.h>
|
2021-08-14 09:36:26 -04:00
|
|
|
#include <Kernel/API/POSIX/fcntl.h>
|
2021-08-14 11:12:54 -04:00
|
|
|
#include <Kernel/API/POSIX/futex.h>
|
2021-08-14 12:06:44 -04:00
|
|
|
#include <Kernel/API/POSIX/net/if.h>
|
|
|
|
#include <Kernel/API/POSIX/net/if_arp.h>
|
|
|
|
#include <Kernel/API/POSIX/net/route.h>
|
2021-08-14 10:53:38 -04:00
|
|
|
#include <Kernel/API/POSIX/netinet/in.h>
|
2021-08-14 12:57:35 -04:00
|
|
|
#include <Kernel/API/POSIX/poll.h>
|
2021-08-14 12:28:05 -04:00
|
|
|
#include <Kernel/API/POSIX/serenity.h>
|
2021-08-14 11:05:53 -04:00
|
|
|
#include <Kernel/API/POSIX/signal.h>
|
2021-08-14 13:07:36 -04:00
|
|
|
#include <Kernel/API/POSIX/stdio.h>
|
2021-08-14 10:03:38 -04:00
|
|
|
#include <Kernel/API/POSIX/sys/mman.h>
|
2021-08-14 10:34:29 -04:00
|
|
|
#include <Kernel/API/POSIX/sys/socket.h>
|
2021-08-14 09:42:24 -04:00
|
|
|
#include <Kernel/API/POSIX/sys/stat.h>
|
2021-08-14 13:24:36 -04:00
|
|
|
#include <Kernel/API/POSIX/sys/time.h>
|
2021-08-14 13:17:32 -04:00
|
|
|
#include <Kernel/API/POSIX/sys/times.h>
|
2021-08-14 10:34:29 -04:00
|
|
|
#include <Kernel/API/POSIX/sys/un.h>
|
2021-08-14 12:55:39 -04:00
|
|
|
#include <Kernel/API/POSIX/sys/utsname.h>
|
2021-08-14 12:18:30 -04:00
|
|
|
#include <Kernel/API/POSIX/sys/wait.h>
|
2021-08-14 10:14:32 -04:00
|
|
|
#include <Kernel/API/POSIX/termios.h>
|
2021-08-14 09:42:24 -04:00
|
|
|
#include <Kernel/API/POSIX/time.h>
|
2021-08-14 13:03:23 -04:00
|
|
|
#include <Kernel/API/POSIX/unistd.h>
|
2020-05-28 10:52:02 -04:00
|
|
|
|
|
|
|
// Kernel internal options.
|
|
|
|
#define O_NOFOLLOW_NOERROR (1 << 29)
|
|
|
|
#define O_UNLINK_INTERNAL (1 << 30)
|
2020-08-08 11:32:34 -04:00
|
|
|
// Avoid interference with AK/Types.h and LibC/sys/types.h by defining *separate* names:
|
|
|
|
TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessID);
|
|
|
|
TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ThreadID);
|
|
|
|
TYPEDEF_DISTINCT_ORDERED_ID(pid_t, SessionID);
|
|
|
|
TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessGroupID);
|
2018-12-02 19:12:26 -05:00
|
|
|
|
2019-07-03 15:17:35 -04:00
|
|
|
typedef u32 __u32;
|
|
|
|
typedef u16 __u16;
|
|
|
|
typedef u8 __u8;
|
2019-04-06 08:29:29 -04:00
|
|
|
typedef int __s32;
|
|
|
|
typedef short __s16;
|
|
|
|
|
2019-05-09 21:19:25 -04:00
|
|
|
struct iovec {
|
|
|
|
void* iov_base;
|
|
|
|
size_t iov_len;
|
|
|
|
};
|
2019-05-29 17:20:51 -04:00
|
|
|
|
|
|
|
struct sched_param {
|
|
|
|
int sched_priority;
|
|
|
|
};
|
2019-09-23 13:06:03 -04:00
|
|
|
|
2020-03-28 04:47:16 -04:00
|
|
|
#define PT_TRACE_ME 1
|
|
|
|
#define PT_ATTACH 2
|
|
|
|
#define PT_CONTINUE 3
|
|
|
|
#define PT_SYSCALL 4
|
|
|
|
#define PT_GETREGS 5
|
|
|
|
#define PT_DETACH 6
|
2020-04-04 04:26:56 -04:00
|
|
|
#define PT_PEEK 7
|
2020-04-05 15:58:44 -04:00
|
|
|
#define PT_POKE 8
|
2020-04-07 11:23:37 -04:00
|
|
|
#define PT_SETREGS 9
|
2021-04-15 12:34:51 -04:00
|
|
|
#define PT_POKEDEBUG 10
|
|
|
|
#define PT_PEEKDEBUG 11
|
2020-08-28 09:15:51 -04:00
|
|
|
|
2021-05-19 05:31:43 -04:00
|
|
|
#define ST_RDONLY 0x1
|
|
|
|
#define ST_NOSUID 0x2
|
|
|
|
|
|
|
|
struct statvfs {
|
|
|
|
unsigned long f_bsize;
|
|
|
|
unsigned long f_frsize;
|
|
|
|
fsblkcnt_t f_blocks;
|
|
|
|
fsblkcnt_t f_bfree;
|
|
|
|
fsblkcnt_t f_bavail;
|
|
|
|
|
|
|
|
fsfilcnt_t f_files;
|
|
|
|
fsfilcnt_t f_ffree;
|
|
|
|
fsfilcnt_t f_favail;
|
|
|
|
|
|
|
|
unsigned long f_fsid;
|
|
|
|
unsigned long f_flag;
|
|
|
|
unsigned long f_namemax;
|
|
|
|
};
|