mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-29 13:58:21 +08:00
mdbx: minor refine def of cold/hot attributes.
Change-Id: I7ec80dde8b88885d7fb2ce5dbccb3726c4fe62f5
This commit is contained in:
parent
1b780162dc
commit
ef35aae2fe
5
reopen.h
5
reopen.h
@ -70,6 +70,9 @@
|
||||
#ifndef __hot
|
||||
# if defined(NDEBUG) && (defined(__GNUC__) && !defined(__clang__))
|
||||
# define __hot __attribute__((hot, optimize("O3")))
|
||||
# elif defined(__GNUC__)
|
||||
/* cland case, just put frequently used functions in separate section */
|
||||
# define __cold __attribute__((section("text.hot")))
|
||||
# else
|
||||
# define __hot
|
||||
# endif
|
||||
@ -80,7 +83,7 @@
|
||||
# define __cold __attribute__((cold, optimize("Os")))
|
||||
# elif defined(__GNUC__)
|
||||
/* cland case, just put infrequently used functions in separate section */
|
||||
# define __cold __attribute__((section("text.cold")))
|
||||
# define __cold __attribute__((section("text.unlikely")))
|
||||
# else
|
||||
# define __cold
|
||||
# endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user