🎨 Rewrap the renamed C API docs to the tree's 100 columns

The runtime crate's rename lengthened two doc lines of the C API past 100
columns. cbindgen measures a function's doc with its one-line signature, so it
wrapped rvg_graphics_device_pool_grow's signature, and the committed header no
longer equalled its output (`cargo xtask header --check` failed on b347's Mac
and Linux legs). Rewrap the two paragraphs, pool_grow's and
rvg_quiesce_for_exit's, and their copies in reims_vgpu.h, so the header keeps
its form. No word changes.
This commit is contained in:
Anees Iqbal committed 2026-11-20 09:52:15 -08:00
1 parent 2834c057ee
commit a16076ff37
2 files changed
+36 -36

No files matched your search

+18 -18
View File
@@ -700,10 +700,10 @@ RvgStatus rvg_graphics_device_pool_removed(RvgGraphicsDevice *device, uint64_t p
// Asks for at least `length` more bytes of the guest's Shared pool now, ahead of the guest's own
// ask, as that ask does: the device's pool thread takes a block of at least `length` bytes (one
// metal2vulkan-runtime unit, 16 MiB, for each piece of the guest's headroom) and asks the host to map
// it (pool_add). QEMU calls it for its device's `x-pool-grow` property. RVG_ERR_INVALID_ARGUMENT
// for a device without a pool or a `length` of 0. On any thread: waits for nothing. Calls back:
// never.
// metal2vulkan-runtime unit, 16 MiB, for each piece of the guest's headroom) and asks the host to
// map it (pool_add). QEMU calls it for its device's `x-pool-grow` property.
// RVG_ERR_INVALID_ARGUMENT for a device without a pool or a `length` of 0. On any thread: waits
// for nothing. Calls back: never.
//
// # Safety
// `device` is a live graphics device handle.
@@ -745,20 +745,20 @@ void rvg_graphics_device_release(RvgGraphicsDevice *device);
// no call made and a graphics device unreleased ends with `_exit` there instead. It takes no
// handle: the GPU devices the library keeps are the process's. Its answer is whether the host may
// then call `exit`. The library's threads park for good at their next call into it, and its calls
// in progress on other threads are waited for; on the platform over metal2vulkan-runtime, then, where a
// GPU device is still live, the runtime's threads end and the GPU completes what was submitted,
// and GPU work asked for on this thread after it is refused. Nothing is freed, and a call on
// another thread after it never returns. Every wait ends within `timeout_ms`. True where the calls
// ended in time and, on the Vulkan platform, the library never opened a GPU device in the process,
// or, on the platform over metal2vulkan-runtime, it keeps none (the release of the last graphics device
// let go of them). False otherwise, the device stopped or not, and where a call outlasted the
// wait: the library then writes its degradation counts, and the host runs its own exit work and
// ends with `_exit` rather than `exit`, since neither platform's runtime supports an `exit` with a
// device live (on NVIDIA's driver one can end in SIGSEGV inside the driver's exit handler), and on
// Linux the Vulkan platform's runtime can end the process with `_exit` inside its own exit
// handler, before the host's ran, while its work outlasts the let-go of its device (a pipeline's
// making in the driver). A second call on the same thread answers at once, with the first answer.
// Calls back: never.
// in progress on other threads are waited for; on the platform over metal2vulkan-runtime, then,
// where a GPU device is still live, the runtime's threads end and the GPU completes what was
// submitted, and GPU work asked for on this thread after it is refused. Nothing is freed, and a
// call on another thread after it never returns. Every wait ends within `timeout_ms`. True where
// the calls ended in time and, on the Vulkan platform, the library never opened a GPU device in
// the process, or, on the platform over metal2vulkan-runtime, it keeps none (the release of the
// last graphics device let go of them). False otherwise, the device stopped or not, and where a
// call outlasted the wait: the library then writes its degradation counts, and the host runs its
// own exit work and ends with `_exit` rather than `exit`, since neither platform's runtime
// supports an `exit` with a device live (on NVIDIA's driver one can end in SIGSEGV inside the
// driver's exit handler), and on Linux the Vulkan platform's runtime can end the process with
// `_exit` inside its own exit handler, before the host's ran, while its work outlasts the let-go
// of its device (a pipeline's making in the driver). A second call on the same thread answers at
// once, with the first answer. Calls back: never.
bool rvg_quiesce_for_exit(uint64_t timeout_ms);
// The device's region: its first byte, page-aligned, and, through `size` where it is not NULL,
+18 -18
View File
@@ -712,10 +712,10 @@ pub unsafe extern "C" fn rvg_graphics_device_pool_removed(
/// Asks for at least `length` more bytes of the guest's Shared pool now, ahead of the guest's own
/// ask, as that ask does: the device's pool thread takes a block of at least `length` bytes (one
/// metal2vulkan-runtime unit, 16 MiB, for each piece of the guest's headroom) and asks the host to map
/// it (pool_add). QEMU calls it for its device's `x-pool-grow` property. RVG_ERR_INVALID_ARGUMENT
/// for a device without a pool or a `length` of 0. On any thread: waits for nothing. Calls back:
/// never.
/// metal2vulkan-runtime unit, 16 MiB, for each piece of the guest's headroom) and asks the host to
/// map it (pool_add). QEMU calls it for its device's `x-pool-grow` property.
/// RVG_ERR_INVALID_ARGUMENT for a device without a pool or a `length` of 0. On any thread: waits
/// for nothing. Calls back: never.
///
/// # Safety
/// `device` is a live graphics device handle.
@@ -813,20 +813,20 @@ pub unsafe extern "C" fn rvg_graphics_device_release(device: *mut RvgGraphicsDev
/// no call made and a graphics device unreleased ends with `_exit` there instead. It takes no
/// handle: the GPU devices the library keeps are the process's. Its answer is whether the host may
/// then call `exit`. The library's threads park for good at their next call into it, and its calls
/// in progress on other threads are waited for; on the platform over metal2vulkan-runtime, then, where a
/// GPU device is still live, the runtime's threads end and the GPU completes what was submitted,
/// and GPU work asked for on this thread after it is refused. Nothing is freed, and a call on
/// another thread after it never returns. Every wait ends within `timeout_ms`. True where the calls
/// ended in time and, on the Vulkan platform, the library never opened a GPU device in the process,
/// or, on the platform over metal2vulkan-runtime, it keeps none (the release of the last graphics device
/// let go of them). False otherwise, the device stopped or not, and where a call outlasted the
/// wait: the library then writes its degradation counts, and the host runs its own exit work and
/// ends with `_exit` rather than `exit`, since neither platform's runtime supports an `exit` with a
/// device live (on NVIDIA's driver one can end in SIGSEGV inside the driver's exit handler), and on
/// Linux the Vulkan platform's runtime can end the process with `_exit` inside its own exit
/// handler, before the host's ran, while its work outlasts the let-go of its device (a pipeline's
/// making in the driver). A second call on the same thread answers at once, with the first answer.
/// Calls back: never.
/// in progress on other threads are waited for; on the platform over metal2vulkan-runtime, then,
/// where a GPU device is still live, the runtime's threads end and the GPU completes what was
/// submitted, and GPU work asked for on this thread after it is refused. Nothing is freed, and a
/// call on another thread after it never returns. Every wait ends within `timeout_ms`. True where
/// the calls ended in time and, on the Vulkan platform, the library never opened a GPU device in
/// the process, or, on the platform over metal2vulkan-runtime, it keeps none (the release of the
/// last graphics device let go of them). False otherwise, the device stopped or not, and where a
/// call outlasted the wait: the library then writes its degradation counts, and the host runs its
/// own exit work and ends with `_exit` rather than `exit`, since neither platform's runtime
/// supports an `exit` with a device live (on NVIDIA's driver one can end in SIGSEGV inside the
/// driver's exit handler), and on Linux the Vulkan platform's runtime can end the process with
/// `_exit` inside its own exit handler, before the host's ran, while its work outlasts the let-go
/// of its device (a pipeline's making in the driver). A second call on the same thread answers at
/// once, with the first answer. Calls back: never.
#[unsafe(no_mangle)]
pub extern "C" fn rvg_quiesce_for_exit(timeout_ms: u64) -> bool {
ffi::export(|| {