mcpp index

compat.libaio

#include

Linux-native asynchronous I/O access library (libaio)

#include <libaio.h>
mcpp add compat.libaio@0.3.113

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// Behavioral test: real kernel AIO submissions, not a link check.
//
// Three things can go wrong with this package and none of them is a missing
// symbol.
//
//   1. `struct iocb` is the KERNEL's structure, assembled by libaio.h out of
//      PADDED/PADDEDptr/PADDEDul macros chosen by endianness and word size. Get
//      that selection wrong and every field lands at the wrong offset — the
//      library still links, io_submit still returns 1, and the kernel writes
//      the wrong bytes to the wrong place. So the assertions read back what
//      actually hit the file.
//
//   2. The plain names `io_getevents` and `io_cancel` do not exist as ordinary
//      definitions upstream: the functions are called `io_getevents_0_4` /
//      `io_cancel_0_4` and publish the short names through
//      `.symver … @@LIBAIO_0.4`. Whether that survives into a consumer's link
//      is a linker behavior, so both are called here on purpose.
//
//   3. libaio does NOT use errno. Every wrapper returns `-errno` directly and
//      restores the caller's errno, which is the opposite of the convention
//      the surrounding POSIX calls follow. The error-path assertion pins that
//      down rather than assuming it.
// …

tests/examples/libaio/tests/aio.cpp · 项目 tests/examples/libaio

构建

targets
aio (lib)
language
c++23
C standard
c11
import std
no
include dirs
libaio-0.3.113/mcpp/include

源文件 (12)

  • libaio-0.3.113/src/io_queue_init.c
  • libaio-0.3.113/src/io_queue_release.c
  • libaio-0.3.113/src/io_queue_wait.c
  • libaio-0.3.113/src/io_queue_run.c
  • libaio-0.3.113/src/io_getevents.c
  • libaio-0.3.113/src/io_submit.c
  • libaio-0.3.113/src/io_cancel.c
  • libaio-0.3.113/src/io_setup.c
  • libaio-0.3.113/src/io_destroy.c
  • libaio-0.3.113/src/io_pgetevents.c
  • libaio-0.3.113/src/raw_syscall.c
  • libaio-0.3.113/src/compat-0_1.c

生成的文件

  • libaio-0.3.113/mcpp/include/libaio.h

版本

版本平台 镜像sha256
0.3.113 最新 Linux GLOBAL CN 2c44d1c5fd0d…