From: ljsebald <ljs...@us...> - 2023-12-19 16:16:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 7624991cf3910bfdb45a53d29d06961c23e3888f (commit) via 5ddd0c5b098da9a8ce727a49c15b54fed23da7eb (commit) from 7a141df18e715535f297503d8e75164b37659de4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7624991cf3910bfdb45a53d29d06961c23e3888f Merge: 7a141df 5ddd0c5 Author: Lawrence Sebald <ljs...@us...> Date: Tue Dec 19 11:16:02 2023 -0500 Merge pull request #421 from KallistiOS/likely_unlikely_rename Renamed likely() and unlikely() Macros commit 5ddd0c5b098da9a8ce727a49c15b54fed23da7eb Author: Falco Girgis <gyr...@gm...> Date: Tue Dec 19 08:34:52 2023 -0600 Renamed likely() and unlikely() macros - Both macros were causing all sorts of name collisions with other codebases, such as GLdc and other Linux kernel-y kinds of code. - Prefixed them both with "__" which is consistent with the rest of the KOS macros in cdefs.h anyway. ----------------------------------------------------------------------- Summary of changes: include/kos/cdefs.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/kos/cdefs.h b/include/kos/cdefs.h index 439ba1c..aa5e09a 100644 --- a/include/kos/cdefs.h +++ b/include/kos/cdefs.h @@ -68,7 +68,7 @@ #define __pure2 __pure /* ditto */ #endif -#ifndef likely +#ifndef __likely /** \brief Directive to inform the compiler the condition is in the likely path. This can be used around conditionals or loops to help inform the @@ -76,12 +76,12 @@ \param exp Boolean expression which expected to be true. - \sa unlikely() + \sa __unlikely() */ -#define likely(exp) __builtin_expect(!!(exp), 1) +#define __likely(exp) __builtin_expect(!!(exp), 1) #endif -#ifndef unlikely +#ifndef __unlikely /** \brief Directive to inform the compiler the condition is in the unlikely path. This can be used around conditionals or loops to help inform the @@ -89,9 +89,9 @@ \param exp Boolean expression which is expected to be false. - \sa likely() + \sa __likely() */ -#define unlikely(exp) __builtin_expect(!!(exp), 0) +#define __unlikely(exp) __builtin_expect(!!(exp), 0) #endif #ifndef __deprecated hooks/post-receive -- A pseudo Operating System for the Dreamcast. |