Created
January 26, 2012 16:27
-
-
Save eddarmitage/1683628 to your computer and use it in GitHub Desktop.
PThreads Typo???
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void hello(int *n) | |
{ | |
printf("hello %d\n",*n); | |
} | |
int main(void) | |
{ | |
int m; | |
pthread_t thr1, thr2; | |
m = 1; | |
pthread_create(&thr1, NULL, (void*(*)(void*))hello, &m); | |
m = 2; | |
pthread_create(&thr1, NULL, (void*(*)(void*))hello, &m); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment