From 529bddfba568b1cb1d1c1fd9095901d6024132ad Mon Sep 17 00:00:00 2001 From: John Sebastian Peterson Date: Sun, 2 Feb 2025 21:14:46 +1100 Subject: [PATCH] support cpp --- bthread.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bthread.h b/bthread.h index 57a0c49..27c724b 100644 --- a/bthread.h +++ b/bthread.h @@ -24,8 +24,13 @@ # define PTHREAD_CANCEL_DEFERRED 0x00000000 #define PTHREAD_CANCELED ((void *) -1) - +#if defined(__cplusplus) +extern "C" { +#endif int pthread_setcancelstate (int , int *); int pthread_setcanceltype (int , int *); void pthread_testcancel (void); int pthread_cancel (pthread_t t); +#if defined(__cplusplus) +} // extern "C" +#endif