|
|
Message-ID: <alpine.LNX.2.20.1603052028190.31711@monopod.intra.ispras.ru>
Date: Sat, 5 Mar 2016 20:30:46 +0300 (MSK)
From: Alexander Monakov <amonakov@...ras.ru>
To: musl@...ts.openwall.com
Subject: Re: [RFC PATCH] micro-optimize __procfdname
On Sat, 5 Mar 2016, Alexander Monakov wrote:
> There's an option of returning a struct containing both a buffer and a
> pointer, but it's a bit worse code-size-wise and may be too magic:
>
> struct procfdname_ret {
> char *ptr, buf[procfdsize];
> } __procfdname_impl(unsigned fd);
>
> #define procfdname(fd) __procfdname_impl(fd).ptr
>
> ... and in __procfdname_impl assign a pointer to last filled position in
> retval.buf to retval.ptr.
Rich explained on IRC that it's not correct (thanks!), and I don't see a way
to unbreak it. Sorry for the noise.
Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.