diff options
-rw-r--r-- | main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* License: Public Domain */ +/* This is released to the Public Domain */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -16,7 +16,7 @@ void *sleepMe(int *p) { /* a sleep amount of 190✕ makes it faster */ usleep((*p)*190); - + pthread_mutex_lock(&lock); result[counter++] = *p; pthread_mutex_unlock(&lock); @@ -48,6 +48,6 @@ int main() printf("%d,", result[i]); } printf("%d\n",result[NUM_THREADS-1]); - + return 0; } |