Replace programs/fileio_asyncio.c with a declaration-only shim and register Rust's async file-I/O implementation in the library archive. Preserve the C ABI for pool and job contexts, including DEBUGLEVEL pointer-based pthread wrappers, and select separate Rust build configurations for those layouts. Keep ordered-read queue state locked while waiting, drain queued work before shutdown frees job buffers, and use platform large-file seeks for sparse writes. Test Plan: - `cargo test --no-default-features --lib fileio_asyncio` (7 passed). - `cargo test --no-default-features --features debug-pthread --lib fileio_asyncio` (7 passed). - `cargo check --all-targets`, clippy library/benches/tests, and nightly fmt check (passed). - Threaded program build and README round-trip (passed). - `make -C tests poolTests` and `./tests/poolTests` (passed). - Current C shim object defines no `AIO_*` symbols; the Rust archive exports all 20 declarations. - Full standalone all-target Rust tests and the default CLI archive rebuild remain affected by unrelated C/Rust integration and another worker's in-progress benchmark changes.
18 lines
709 B
C
18 lines
709 B
C
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under both the BSD-style license (found in the
|
|
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
|
* in the COPYING file in the root directory of this source tree).
|
|
* You may select, at your option, one of the above-listed licenses.
|
|
*/
|
|
|
|
/*
|
|
* The async file-I/O implementation lives in rust/src/fileio_asyncio.rs.
|
|
* Keep this translation unit in the program source list so existing C build
|
|
* rules and fileio.c callers continue to include the public declarations, but
|
|
* do not provide a second definition of the AIO_* symbols.
|
|
*/
|
|
#include "fileio_asyncio.h"
|