Re: [PATCH v3 9/9] rust: file: add abstraction for `poll_table`

From: Benno Lossin
Date: Wed Jan 24 2024 - 05:12:16 EST


On 18.01.24 15:36, Alice Ryhl wrote:
> +/// Wraps the kernel's `struct poll_table`.
> +///
> +/// # Invariants
> +///
> +/// This struct contains a valid `struct poll_table`.
> +///
> +/// For a `struct poll_table` to be valid, its `_qproc` function must follow the safety
> +/// requirements of `_qproc` functions. It must ensure that when the waiter is removed and a rcu

The first sentence sounds a bit weird, what is meant by `_qproc` functions?
Do you have a link to where that is defined? Or is the whole definition the
next sentence?

--
Cheers,
Benno

> +/// grace period has passed, it must no longer access the `wait_queue_head`.
> +#[repr(transparent)]
> +pub struct PollTable(Opaque<bindings::poll_table>);