Messages in this thread | | | Date | Fri, 2 Jun 2023 08:32:25 +0000 | Subject | Re: [PATCH v2 4/8] rust: workqueue: define built-in queues | From | Alice Ryhl <> |
| |
Gary Guo <gary@garyguo.net> writes: > On Thu, 1 Jun 2023 13:49:42 +0000 > Alice Ryhl <aliceryhl@google.com> wrote: >> From: Wedson Almeida Filho <walmeida@microsoft.com> >> >> We provide these methods because it lets us access these queues from >> Rust without using unsafe code. >> >> These methods return `&'static Queue`. References annotated with the >> 'static lifetime are used when the referent will stay alive forever. >> That is ok for these queues because they are global variables and cannot >> be destroyed. >> >> Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> >> Co-developed-by: Alice Ryhl <aliceryhl@google.com> >> Signed-off-by: Alice Ryhl <aliceryhl@google.com> >> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> > > This looks fine to me, so: > > Reviewed-by: Gary Guo <gary@garyguo.net> > > Just one question about style: would people prefer: > > kernel::workqueue::system().enqueue(...) > > or > > use kernel::workqueue::Queue; > Queue::system().enqueue(...) > > ?
I prefer the first version.
Alice
| |