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