bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] hurd: Microoptimize mmap ()


From: Samuel Thibault
Subject: Re: [PATCH 3/4] hurd: Microoptimize mmap ()
Date: Mon, 24 Apr 2023 23:25:52 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Sergey Bugaev, le mar. 25 avril 2023 00:09:58 +0300, a ecrit:
> What I should rather look into is marking __hurd_fail and friends with
> __attribute__((cold)); that would take care of all the error branches
> everywhere automatically without having to mark things up.

Yes, that'd probably be great :)

> But I did a quick grep and found nothing using __attribute__((cold))
> yet, so I don't know what the right way of using it would be
> (and maybe it's not being used intentionally?).

It's probably that just nobody thought about adding it.

> I'm thinking it should probably go into misc/sys/cdefs.h as __COLD (or
> __attribute_cold?). Something like this:
> 
> #if __glibc_has_attribute (cold)
> #define __COLD __attribute__ ((cold))
> #else
> #define __COLD
> #endif
> 
> What do you think?

Yes! Though you can even make it

#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__cold__)

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]