lkml.org 
[lkml]   [2023]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] tools/nolibc: replace duplicated -ENOSYS return with single -ENOSYS return
Hi all,

On Sun, Aug 27, 2023 at 11:17:19AM +0200, Thomas Weißschuh wrote:
> To be honest I don't see a problem with the current aproach.
> It is very obvious what is going on, the same pattern is used by other
> projects and the "overhead" is very small.
>
>
> It seems the macros will only work for simple cases which only test the
> availability of a single syscall number.
>
> Of these we currently only have:
> gettimeofday(), lseek(), statx(), wait4()
>
> So in it's current form we save 4 * 4 = 16 lines of code.
> The proposed solution introduces 14 + 2 (empty) = 16 lines of new code,
> and a bunch of mental overhead.
>
> In case multiple underlying syscalls can be used these take different
> arguments which a simple macro won't be able to encode sanely.

I totally agree, I would prefer all this to be manageable by humans with
no preprocessor brain implant as much as possible as well.

Thanks,
Willy

\
 
 \ /
  Last update: 2023-08-29 08:31    [W:0.298 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site