Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. void *worker(const char* string) {
  2.         printf("%s\n", string);
  3.         return NULL;
  4. }
  5.  
  6. int main(int argc, int argv[]) {
  7.         pthread_t tid;
  8.         char *string = "test";
  9.         pthread_create(&tid, NULL, (void *(*)(void *))worker,string);
  10.         printf("started %d\n",(int)tid);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement