X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=libthreads.h;h=0c02971342d06ffa903feb01b2d4daadc08754d4;hb=84e24d516d4e9dbd30f1fff7e9a185d1540d20eb;hp=b16c96be83dc4aab21b77f46b3579574a861c137;hpb=df437a93a0599b75a4df8967d2943a01ca931a9a;p=model-checker.git diff --git a/libthreads.h b/libthreads.h index b16c96b..0c02971 100644 --- a/libthreads.h +++ b/libthreads.h @@ -1,16 +1,27 @@ +/** @file libthreads.h + * @brief Basic Thread Library Functionality. + */ + #ifndef __LIBTHREADS_H__ #define __LIBTHREADS_H__ -typedef int thread_id_t; -typedef void (*thrd_start_t)(); +#ifdef __cplusplus +extern "C" { +#endif + + typedef void (*thrd_start_t)(void *); + + typedef int thrd_t; -typedef thread_id_t thrd_t; + int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg); + int thrd_join(thrd_t); + int thrd_yield(void); + thrd_t thrd_current(void); -int thrd_create(thrd_t *t, thrd_start_t start_routine, void *arg); -int thrd_join(thrd_t); -int thrd_yield(void); -thrd_t thrd_current(void); + void user_main(void); -extern void user_main(void); +#ifdef __cplusplus +} +#endif #endif /* __LIBTHREADS_H__ */