Skip to content

Commit efcd731

Browse files
committed
generic: document that _c_boolean_expr_()/_c_unlikely_()/_c_likely_() are async-signal-safe
They are very fundamental. It's important that we can use them at all places. Document it.
1 parent 6bc45c0 commit efcd731

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/c-stdaux-generic.h

+6
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ extern "C" {
129129
*
130130
* Outside of macros, this has no added value.
131131
*
132+
* This macro is async-signal-safe, provided that the condition is.
133+
*
132134
* Return: Evaluates to the value of ``!!_x``.
133135
*/
134136
#define _c_boolean_expr_(_x) _c_internal_boolean_expr_(__COUNTER__, _x)
@@ -164,6 +166,8 @@ extern "C" {
164166
*
165167
* Alias for ``__builtin_expect(!!(_x), 1)``.
166168
*
169+
* This macro is async-signal-safe, provided that the condition is.
170+
*
167171
* Return: The expression ``!!_x`` is evaluated and returned.
168172
*/
169173
#define _c_likely_(_x) _c_internal_likely_(_x)
@@ -200,6 +204,8 @@ extern "C" {
200204
*
201205
* Alias for ``__builtin_expect(!!(_x), 0)``.
202206
*
207+
* This macro is async-signal-safe, provided that the condition is.
208+
*
203209
* Return: The expression ``!!_x`` is evaluated and returned.
204210
*/
205211
#define _c_unlikely_(_x) _c_internal_unlikely_(_x)

0 commit comments

Comments
 (0)