2023-08-12 09:16:20 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: AuProcAddresses.Linux.hpp
|
|
|
|
Date: 2023-8-11
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <linux/aio_abi.h>
|
2024-02-23 12:44:43 +00:00
|
|
|
#include <sys/socket.h>
|
2023-08-12 09:16:20 +00:00
|
|
|
|
|
|
|
struct robust_list_head;
|
2024-07-01 11:23:18 +00:00
|
|
|
struct glibc_aicb;
|
2023-08-12 09:16:20 +00:00
|
|
|
|
|
|
|
namespace Aurora
|
|
|
|
{
|
|
|
|
void InitLinuxAddresses();
|
|
|
|
|
|
|
|
int pidfd_getfd(int pidfd, int targetfd,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
int pidfd_open(pid_t pid, unsigned int flags);
|
|
|
|
|
|
|
|
long get_robust_list(int pid, struct robust_list_head **head_ptr, size_t *len_ptr);
|
|
|
|
|
|
|
|
long set_robust_list(struct robust_list_head *head, size_t len);
|
|
|
|
|
2023-08-18 21:51:47 +00:00
|
|
|
int futex_wake(uint32_t *addr, uint32_t nthreads);
|
2023-08-12 09:16:20 +00:00
|
|
|
|
2023-08-18 21:51:47 +00:00
|
|
|
int futex_wait(uint32_t *addr, uint32_t expected,
|
2023-08-12 09:16:20 +00:00
|
|
|
const struct timespec *timeout);
|
|
|
|
|
2023-08-18 21:51:47 +00:00
|
|
|
int futex_wait(uint32_t *addr, uint32_t expected);
|
2023-08-12 09:16:20 +00:00
|
|
|
|
2023-08-18 21:51:47 +00:00
|
|
|
int futex_wake_shared(uint32_t *addr, uint32_t nthreads);
|
2023-08-12 09:16:20 +00:00
|
|
|
|
2023-08-18 21:51:47 +00:00
|
|
|
int futex_wait_shared(uint32_t *addr, uint32_t expected,
|
|
|
|
const struct timespec *timeout);
|
|
|
|
|
|
|
|
int futex_wake(volatile uint32_t *addr, uint32_t nthreads);
|
|
|
|
|
|
|
|
int futex_wait(volatile uint32_t *addr, uint32_t expected,
|
2023-08-12 09:16:20 +00:00
|
|
|
const struct timespec *timeout);
|
|
|
|
|
2023-08-18 21:51:47 +00:00
|
|
|
int futex_wait(volatile uint32_t *addr, uint32_t expected);
|
2023-08-12 09:16:20 +00:00
|
|
|
|
|
|
|
int io_submit(aio_context_t ctx, long nr, struct iocb **iocbpp);
|
|
|
|
|
|
|
|
int io_cancel(aio_context_t ctx_id, struct iocb *iocb,
|
|
|
|
struct io_event *result);
|
|
|
|
|
|
|
|
int io_destroy(aio_context_t ctx);
|
|
|
|
|
|
|
|
int io_setup(unsigned nr, aio_context_t *ctxp);
|
|
|
|
|
|
|
|
int io_getevents(aio_context_t ctx, long min_nr, long max_nr,
|
|
|
|
struct io_event *events,
|
2024-09-07 21:45:34 +00:00
|
|
|
struct timespec *timeout,
|
|
|
|
bool bStrictUserspaceOnly);
|
2023-08-18 21:38:17 +00:00
|
|
|
|
|
|
|
ssize_t sys_getrandom(void *pBuffer, size_t uLength);
|
2023-12-22 03:44:46 +00:00
|
|
|
|
|
|
|
int close_range(unsigned int first, unsigned int last,
|
|
|
|
unsigned int flags);
|
2024-02-23 12:44:43 +00:00
|
|
|
|
|
|
|
inline int (*pgetsockname)(int sockfd, struct sockaddr *addr,
|
|
|
|
socklen_t *addrlen);
|
|
|
|
|
2024-03-05 11:06:29 +00:00
|
|
|
inline void (AU_NORETURN *p__cxa_throw)(void *pException, std::type_info *typeInfo, void (*fDtor)(void *pThis));
|
|
|
|
|
|
|
|
inline AuUInt32 (*p_Unwind_RaiseException)(void *pException);
|
2024-07-01 11:23:18 +00:00
|
|
|
|
|
|
|
inline int (* pgai_error) (struct glibc_aicb *pContext);
|
|
|
|
inline int (* pgai_cancel) (struct glibc_aicb *pContext);
|
|
|
|
inline int (* pgetaddrinfo_a) (int mode, struct glibc_aicb **pContext, int count, struct sigevent *sig);
|
|
|
|
#define AURORA_HAS_GLIBC_RESOLVER_PROXY_STUBS
|
2023-08-12 09:16:20 +00:00
|
|
|
}
|