diff options
author | Kyle K <kylek389@gmail.com> | 2011-02-12 16:34:07 -0600 |
---|---|---|
committer | Kamil Kaminski <kamilkss@gmail.com> | 2011-02-12 16:34:07 -0600 |
commit | dbe61956e0b4235238c225df58383141337bc2d2 (patch) | |
tree | 5ec7f42e8c86ce61aca4f4b6045485cf279f52ac | |
parent | 55ef7d2374e5868df816d43cc9ad59aa76b5763f (diff) | |
download | sandbox-dbe61956e0b4235238c225df58383141337bc2d2.tar.gz sandbox-dbe61956e0b4235238c225df58383141337bc2d2.tar.bz2 sandbox-dbe61956e0b4235238c225df58383141337bc2d2.zip |
kill whitespace
-rw-r--r-- | pthread1.c | 12 | ||||
-rw-r--r-- | pthread2.c | 10 | ||||
-rw-r--r-- | pthread3.c | 8 |
3 files changed, 15 insertions, 15 deletions
@@ -1,9 +1,9 @@ /* extreme case */ -#include <stdlib.h> -#include <stdio.h> -#include <pthread.h> -#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <pthread.h> +#include <unistd.h> int left = 500, right = 500; pthread_mutex_t lock, cond_lock; @@ -24,11 +24,11 @@ void *leftf(void *args) struct timespec ts; gettimeofday(&tv, NULL); ts.tv_sec = tv.tv_sec + 1; - ts.tv_nsec = 0; + ts.tv_nsec = 0; pthread_mutex_lock(&cond_lock); pthread_cond_timedwait(&cond, &cond_lock, &ts); - pthread_mutex_unlock(&cond_lock); + pthread_mutex_unlock(&cond_lock); pthread_mutex_lock(&lock); printf("Now running left\n"); @@ -1,9 +1,9 @@ /* simple */ -#include <stdlib.h> -#include <stdio.h> -#include <pthread.h> -#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <pthread.h> +#include <unistd.h> int left = 500, right = 500; pthread_mutex_t cond_lock; @@ -19,7 +19,7 @@ void *leftf(void *args) { pthread_mutex_lock(&cond_lock); pthread_cond_wait(&cond, &cond_lock); - pthread_mutex_unlock(&cond_lock); + pthread_mutex_unlock(&cond_lock); printf("Now running left\n"); @@ -1,9 +1,9 @@ /* with array */ -#include <stdlib.h> -#include <stdio.h> -#include <pthread.h> -#include <unistd.h> +#include <stdlib.h> +#include <stdio.h> +#include <pthread.h> +#include <unistd.h> int left = 500, right = 500; pthread_mutex_t cond_lock; |