Guest User

Untitled

a guest
May 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. main() {
  2. ...
  3. pthread_t thread;
  4. i = pthread_create(&thread, NULL, &count, NULL);
  5. ...
  6. }
  7.  
  8. void* count(void* x) {
  9. int j;
  10. printf("hello\n");
  11. for (j = 1; j <= 100; j++) {
  12. printf("%d\n", j);
  13. }
  14. pthread_exit(NULL);
  15. }
Add Comment
Please, Sign In to add comment