Thread (7 messages) 7 messages, 2 authors, 2019-10-01

Re: [PATCH] io_uring: use __kernel_timespec in timeout ABI

From: Arnd Bergmann <arnd@arndb.de>
Date: 2019-10-01 15:58:05
Also in: linux-block, linux-fsdevel, lkml

On Tue, Oct 1, 2019 at 5:52 PM Jens Axboe [off-list ref] wrote:
On 10/1/19 9:49 AM, Arnd Bergmann wrote:
quoted
On Tue, Oct 1, 2019 at 5:38 PM Jens Axboe [off-list ref] wrote:
quoted
What's wrong with using __kernel_timespec? Just the name?
I suppose liburing could add a macro to give it a different name
for its users.
Just that it seems I need to make it available through liburing on
systems that don't have it yet. Not a big deal, though.
Ah, right. I t would not cover the case of building against kernel
headers earlier than linux-5.1 but running on a 5.4+ kernel.

I assumed that that you would require new kernel headers anyway,
but if you have a copy of the io_uring header, that is not necessary.
One thing that struck me about this approach - we then lose the ability to
differentiate between "don't want a timed timeout" with ts == NULL, vs
tv_sec and tv_nsec both being 0.
You could always define a special constant such as
'#define IO_URING_TIMEOUT_NEVER -1ull' if you want to
support for 'never wait if it's not already done' and 'wait indefinitely'.
I think I'll stuck with that you had and just use __kernel_timespec in
liburing.
Ok.

       Arnd
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help