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…