diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,3 +1,4 @@ +/* License: Public Domain */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -12,7 +13,7 @@ int counter; void *sleepMe(int *p) { - usleep((*p)*500);//*200 will do, but *500 is needed to reliably attain a correct order for numbers only 1 apart + usleep((*p)*500);// *200 will do, but *500 is needed to reliably attain a correct order for numbers only 1 apart pthread_mutex_lock(&lock); result[counter++] = *p; |