Re: [PATCH net-next v3 7/8] rust: Add read_poll_timeout functions
From: Andrew Lunn
Date: Fri Oct 18 2024 - 10:15:57 EST
> > Ah, what's the recommended way to get a null-terminated string from
> > &str?
>
> In this case, you should be able to use the `c_str!` macro.
>
> `kernel::c_str!(core::file!()).as_char_ptr()`
Does this allocate memory? In this case, that would be O.K, but at
some point i expect somebody is going to want the atomic version of
this poll helper. You then need to pass additional flags to kalloc()
if you call it in atomic context.
Andrew