IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
native_aio.hxx
Go to the documentation of this file.
1
3
4#pragma once
5#include <ice/string.hxx>
6
8{
9
10 using AIOPort = struct AIOPortInternal*;
11
17
19 {
20 };
21
28
29 using AIORequestCallback = void(*)(
31 ice::usize bytes_read,
32 void* userdata
33 ) noexcept;
34
35 struct alignas(8) AIORequest
36 {
37 using enum AIORequestResult;
38
41 char _internal[40];
42
44
47
49 void* _userdata = nullptr;
50 };
51
55 ) noexcept -> ice::native_aio::AIOPort;
56
59 auto aio_native_handle(ice::native_aio::AIOPort port) noexcept -> void*;
61
67
71 ) noexcept -> ice::u32;
72
73} // namespace ice::native_aio
Definition info.hxx:8
Definition native_aio.hxx:8
auto aio_native_handle(ice::native_aio::AIOPort port) noexcept -> void *
void(*)( ice::native_aio::AIORequestResult result, ice::usize bytes_read, void *userdata) noexcept AIORequestCallback
Definition native_aio.hxx:29
void aio_close(ice::native_aio::AIOPort port) noexcept
auto aio_worker_limit(ice::native_aio::AIOPort port) noexcept -> ice::u32
AIORequestResult
Definition native_aio.hxx:23
@ Success
Definition native_aio.hxx:25
@ Error
Definition native_aio.hxx:24
@ Timeout
Definition native_aio.hxx:26
auto aio_process_events(ice::native_aio::AIOPort port, ice::native_aio::AIOProcessLimits limits={}) noexcept -> ice::u32
auto aio_open(ice::Allocator &alloc, ice::native_aio::AIOPortInfo const &info) noexcept -> ice::native_aio::AIOPort
auto aio_status(ice::native_aio::AIOPort port) noexcept -> ice::native_aio::AIOStatusInfo
struct AIOPortInternal * AIOPort
Definition native_aio.hxx:10
ice::BasicString< char > String
Definition string.hxx:82
auto alloc(ice::usize size) noexcept -> ice::AllocResult
constexpr ice::u32 const u32_max
Definition constants.hxx:37
std::uint32_t u32
Definition types.hxx:26
ice::AllocatorBase< ice::build::is_debug||ice::build::is_develop > Allocator
Definition mem_types.hxx:25
std::uint8_t u8
Definition types.hxx:24
Definition native_aio.hxx:13
ice::u32 worker_limit
Definition native_aio.hxx:14
ice::String debug_name
Definition native_aio.hxx:15
Definition native_aio.hxx:63
ice::u32 timeout_ms
Definition native_aio.hxx:64
ice::u32 events_max
Definition native_aio.hxx:65
Definition native_aio.hxx:36
ice::native_aio::AIOPort _port
Definition native_aio.hxx:43
void * _userdata
Additional userdata to be passed to the callback.
Definition native_aio.hxx:49
ice::native_aio::AIORequestCallback _callback
Callback to be called when the request completes.
Definition native_aio.hxx:46
char _internal[40]
Definition native_aio.hxx:41
Definition native_aio.hxx:19
Represents a unsigned size value on the given platform.
Definition mem_size_types.hxx:26