diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-06-01 17:50:07 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-06-01 17:50:07 +0000 |
commit | 6c8f17cbd53ae8c0bdc447da59619d6734ebae14 (patch) | |
tree | 1216f52f4180495d3699e39deee969be65685345 /nuttx/examples/ostest/barrier.c | |
parent | 60baf60892705bec8c3180025cd797c5d64a1e1e (diff) | |
download | px4-nuttx-6c8f17cbd53ae8c0bdc447da59619d6734ebae14.tar.gz px4-nuttx-6c8f17cbd53ae8c0bdc447da59619d6734ebae14.tar.bz2 px4-nuttx-6c8f17cbd53ae8c0bdc447da59619d6734ebae14.zip |
examples/ostest can be executed in a loop
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@763 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/ostest/barrier.c')
-rw-r--r-- | nuttx/examples/ostest/barrier.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nuttx/examples/ostest/barrier.c b/nuttx/examples/ostest/barrier.c index 731eaa817..2b6755c9d 100644 --- a/nuttx/examples/ostest/barrier.c +++ b/nuttx/examples/ostest/barrier.c @@ -53,7 +53,7 @@ static void *barrier_func(void *parameter) usleep(500*1000); #endif - /* Take the semaphore */ + /* Wait at the barrier until all threads are synchronized. */ printf("barrier_func: Thread %d calling pthread_barrier_wait()\n", id); status = pthread_barrier_wait(&barrier); @@ -99,6 +99,7 @@ void barrier_test(void) { printf("barrier_test: pthread_barrierattr_init failed, status=%d\n", status); } + /* Create the barrier */ status = pthread_barrierattr_init(&barrierattr); |