Skip to content

Commit b3083de

Browse files
authored
Add C decl block to threading_primitives.h (#26437)
Forgot to add this as part of #26433
1 parent 32a33a1 commit b3083de

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

system/include/emscripten/threading_primitives.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
* found in the LICENSE file.
66
*/
77

8+
#pragma once
9+
810
#include <emscripten/atomic.h>
911

12+
#ifdef __cplusplus
13+
extern "C" {
14+
#endif
15+
1016
// Similar to emscripten_async_wait_callback_t but with a volatile first
1117
// argument.
1218
typedef void (*emscripten_async_wait_volatile_callback_t)(volatile void* address, uint32_t value, ATOMICS_WAIT_RESULT_T waitResult, void* userData);
@@ -180,3 +186,7 @@ ATOMICS_WAIT_TOKEN_T emscripten_condvar_wait_async(emscripten_condvar_t * _Nonnu
180186
// Pass numWaitersToSignal == EMSCRIPTEN_NOTIFY_ALL_WAITERS to wake all waiters
181187
// ("broadcast" operation).
182188
void emscripten_condvar_signal(emscripten_condvar_t * _Nonnull condvar, int64_t numWaitersToSignal);
189+
190+
#ifdef __cplusplus
191+
}
192+
#endif

0 commit comments

Comments
 (0)