AuroraRuntime/Source/AuProcAddresses.Linux.hpp

78 lines
2.5 KiB
C++
Raw Normal View History

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;
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,
struct timespec *timeout,
bool bStrictUserspaceOnly);
ssize_t sys_getrandom(void *pBuffer, size_t uLength);
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);
inline void (AU_NORETURN *p__cxa_throw)(void *pException, std::type_info *typeInfo, void (*fDtor)(void *pThis));
inline AuUInt32 (*p_Unwind_RaiseException)(void *pException);
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
}