diff mbox series

[liburing,v1,1/2] lib: Add __hot and __cold macros

Message ID 20220703115240.215695-2-ammar.faizi@intel.com (mailing list archive)
State New
Headers show
Series __hot and __cold | expand

Commit Message

Ammar Faizi July 3, 2022, 11:59 a.m. UTC
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>

A prep patch. These macros will be used to annotate hot and cold
functions. Currently, the __hot macro is not used, we will only use
the __cold macro at the moment.

Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
 src/lib.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alviro Iskandar Setiawan July 3, 2022, 12:20 p.m. UTC | #1
On Sun, Jul 3, 2022 at 6:59 PM Ammar Faizi wrote:
>
> From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
>
> A prep patch. These macros will be used to annotate hot and cold
> functions. Currently, the __hot macro is not used, we will only use
> the __cold macro at the moment.
>
> Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>

Reviewed-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>

tq

-- Viro
diff mbox series

Patch

diff --git a/src/lib.h b/src/lib.h
index 5844cd2..89a40f2 100644
--- a/src/lib.h
+++ b/src/lib.h
@@ -34,6 +34,8 @@ 
 #endif
 
 #define __maybe_unused		__attribute__((__unused__))
+#define __hot			__attribute__((__hot__))
+#define __cold			__attribute__((__cold__))
 
 void *__uring_malloc(size_t len);
 void __uring_free(void *p);