From: Willy Tarreau <w@1wt.eu>
To: "Thomas Weißschuh" <thomas@t-8ch.de>
Cc: Zhangjin Wu <falcon@tinylab.org>,
arnd@arndb.de, david.laight@aculab.com,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
tanyuan@tinylab.org
Subject: Re: [RFC] tools/nolibc: replace duplicated -ENOSYS return with single -ENOSYS return
Date: Tue, 29 Aug 2023 08:29:44 +0200 [thread overview]
Message-ID: <ZO2QWPYpo1fdXjX+@1wt.eu> (raw)
In-Reply-To: <1ffa33a8-dd97-480f-b8f4-2ce49c60cabb@t-8ch.de>
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
next prev parent reply other threads:[~2023-08-29 6:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-27 8:32 [RFC] tools/nolibc: replace duplicated -ENOSYS return with single -ENOSYS return Zhangjin Wu
2023-08-27 9:17 ` Thomas Weißschuh
2023-08-29 6:29 ` Willy Tarreau [this message]
2023-08-30 0:19 ` Zhangjin Wu
2023-08-30 3:25 ` Willy Tarreau
2023-09-01 19:03 ` Zhangjin Wu
2023-09-03 9:31 ` Willy Tarreau
2023-08-27 21:51 ` David Laight
2023-08-28 9:46 ` David Laight
2023-08-29 23:39 ` Zhangjin Wu
2023-08-30 14:40 ` Ammar Faizi
2023-08-30 16:21 ` David Laight
2023-08-31 7:41 ` Zhangjin Wu
2023-08-31 8:37 ` David Laight
2023-09-01 19:48 ` Zhangjin Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZO2QWPYpo1fdXjX+@1wt.eu \
--to=w@1wt.eu \
--cc=arnd@arndb.de \
--cc=david.laight@aculab.com \
--cc=falcon@tinylab.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=tanyuan@tinylab.org \
--cc=thomas@t-8ch.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox