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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29.01.24 18:08, Alice Ryhl wrote:
> On Wed, Jan 24, 2024 at 11:11 AM Benno Lossin <benno.lossin@xxxxxxxxx> wrote:
>>
>> 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?
> 
> Yeah. Does this wording work better for you?
> 
> /// For a `struct poll_table` to be valid, its `_qproc` function must
> follow the safety
> /// requirements of `_qproc` functions:
> ///
> /// * The `_qproc` function is given permission to enqueue a waiter to

Does it make sense to change "waiter" to `wait_queue_head`?

> the provided `poll_table`
> ///   during the call. Once the waiter is removed and an rcu grace
> period has passed, it must no
> ///   longer access the `wait_queue_head`.

Yes that is better.

-- 
Cheers,
Benno







[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux