Date: Mon, 19 Jul 2021 17:33:03 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Warner Losh <imp@bsdimp.com> Cc: Dmitry Chagin <dchagin@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: pondering pi futexes Message-ID: <YPWNH3q7MvFwRIXE@kib.kiev.ua> In-Reply-To: <CANCZdfqMc-Covfi9ztBgSYURN2EO1ad%2Bjx-jTrFd=SFVi=gRcw@mail.gmail.com> References: <YNjT90Kq6XPLpgRE@heemeyer.club> <YNmweV1hEQCyRtMJ@kib.kiev.ua> <YN45PbGEbWdjx5JR@heemeyer.club> <YN7vqdfUkheWJ2v3@kib.kiev.ua> <YPUxTWVSVtL4SCW%2B@heemeyer.club> <YPVG8pXO4sNLfJCF@kib.kiev.ua> <CANCZdfqMc-Covfi9ztBgSYURN2EO1ad%2Bjx-jTrFd=SFVi=gRcw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 19, 2021 at 08:08:02AM -0600, Warner Losh wrote: > On Mon, Jul 19, 2021, 3:35 AM Konstantin Belousov <kostikbel@gmail.com> > wrote: > > > On Mon, Jul 19, 2021 at 11:01:17AM +0300, Dmitry Chagin wrote: > > > Hi, thanks for the reply, I mostly finished, > > > the new futex impl is fully based on the umtx code, one question before > > review. > > > some umtx API, which is needed for futexes, inlined, like > > > umtxq_busy/unbusy, umtxq_lock/unlock, umtx_pi_alloc/pi_free, etc.. > > > For now I moved such API to the umtx header, but as far as I understand > > > compilers are smart enough now to optimize code without suggestions. > > > Maybe it's time to drop inline hint? > > > > > May be. It is impossible to provide a justified answer without looking > > at the generated code, with/without inline. But usually yes, inline does > > not make a difference for not too large static functions. > > > > Even in header files? There I thought it was one of the few places it > mattered due to semantic differences... has that changed? It does not matter where the static function defined. After the preprocessing stage, compiler parses the compilation unit as the whole. This is formally described in C17 STD 5.1.1.2 Translation phases. Preprocessing occurs in phase 4, while translation proper starts at phase 7 (and finished in 8).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YPWNH3q7MvFwRIXE>