------------------------------------------------------------ pthrad1.h ------------------------------------------------------------ # # # extern void pthread1(void); ------------------------------------------- pthread.c -------------------------------------------- void pthrad1(void) { .... .... } ------------------------------------------ main.c ------------------------------------------- #include "pthread1.h" int main(int argc, char **argv) { ..... pthread = pthread_create(&id1, NULL, (void *)pthread1,NULL); } |
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |