Skip to content

Commit 6fdda6f

Browse files
committed
fix usage of _Bool
1 parent 8b41d10 commit 6fdda6f

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

apple/xnu_threadpark.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ tpark_handle_t *tparkCreateHandle() {
1717
return new tpark_handle_t();
1818
}
1919

20-
void tparkWait(tpark_handle_t *handle, const _Bool unlocked) {
20+
void tparkWait(tpark_handle_t *handle, const bool unlocked) {
2121
if (!unlocked) {
2222
// Set the state to 1 to indicate we want to park
2323
handle->state.store(1, std::memory_order_release);

freebsd/freebsd_threadpark.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ tpark_handle_t* tparkCreateHandle() {
5151
return new tpark_handle_t();
5252
}
5353

54-
void tparkWait(tpark_handle_t *handle, const _Bool unlocked) {
54+
void tparkWait(tpark_handle_t *handle, const bool unlocked) {
5555
if (!unlocked) {
5656
// Indicate we want to park
5757
handle->state.store(1, std::memory_order_release);

include/threadpark.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
#ifndef __cplusplus
55
#include <stdbool.h>
6-
#else
7-
#include <cstdbool>
86
#endif
97

108
#ifdef __cplusplus
@@ -90,7 +88,7 @@ THREAD_PARK_EXPORT void tparkBeginPark(tpark_handle_t *handle);
9088
* - false => This call sets the bit itself, then blocks.
9189
* - true => The bit is assumed to be set already; just block if still needed.
9290
*/
93-
THREAD_PARK_EXPORT void tparkWait(tpark_handle_t *handle, _Bool unlocked);
91+
THREAD_PARK_EXPORT void tparkWait(tpark_handle_t *handle, bool unlocked);
9492

9593
/**
9694
* @brief Conclude or "undo" the parking state (final phase).

openbsd/openbsd_threadpark.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tpark_handle_t* tparkCreateHandle() {
1919
return new tpark_handle_t();
2020
}
2121

22-
void tparkWait(tpark_handle_t *handle, const _Bool unlocked) {
22+
void tparkWait(tpark_handle_t *handle, const bool unlocked) {
2323
if (!unlocked) {
2424
// Indicate we want to park
2525
handle->state.store(1, std::memory_order_release);

win32/win32_threadpark.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ tpark_handle_t *tparkCreateHandle() {
1717
return new tpark_handle_t();
1818
}
1919

20-
void tparkWait(tpark_handle_t *handle, const _Bool unlocked) {
20+
void tparkWait(tpark_handle_t *handle, const bool unlocked) {
2121
if (!unlocked) {
2222
// Indicate we want to park
2323
handle->state.store(1, std::memory_order_release);

0 commit comments

Comments
 (0)