diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-02-20 22:39:56 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-02-20 22:39:56 +0000 |
commit | 630b4bdd3d2ca967f0e1d4f438f7f1761461dd31 (patch) | |
tree | f640e5eab1ce66cdeadd0ab3684ea326f56db8a5 /nuttx/examples/ostest/mutex.c | |
parent | bd7dce092d36128a0f84e5544ccc857a45f6ba2f (diff) | |
download | px4-nuttx-630b4bdd3d2ca967f0e1d4f438f7f1761461dd31.tar.gz px4-nuttx-630b4bdd3d2ca967f0e1d4f438f7f1761461dd31.tar.bz2 px4-nuttx-630b4bdd3d2ca967f0e1d4f438f7f1761461dd31.zip |
Eliminating GCC dependencies
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@14 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/ostest/mutex.c')
-rw-r--r-- | nuttx/examples/ostest/mutex.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/examples/ostest/mutex.c b/nuttx/examples/ostest/mutex.c index d6cad9e39..cb8996053 100644 --- a/nuttx/examples/ostest/mutex.c +++ b/nuttx/examples/ostest/mutex.c @@ -60,14 +60,14 @@ static void *thread_func(void *parameter) if (status != 0) { printf("ERROR thread %d: pthread_mutex_lock failed, status=%d\n", - id, status); + id, status); } if (my_mutex == 1) { printf("ERROR thread=%d: " - "my_mutex should be zero, instead my_mutex=%d\n", - id, my_mutex); + "my_mutex should be zero, instead my_mutex=%d\n", + id, my_mutex); nerrors[ndx]++; } @@ -82,7 +82,7 @@ static void *thread_func(void *parameter) if (status != 0) { printf("ERROR thread %d: pthread_mutex_unlock failed, status=%d\n", - id, status); + id, status); } } pthread_exit(NULL); @@ -114,7 +114,7 @@ void mutex_test(void) pthread_join(thread1, NULL); pthread_join(thread2, NULL); - printf("%s:\t\tThread1\tThread2\n", __FUNCTION__); - printf("%s:\tLoops\t%ld\t%ld\n", __FUNCTION__, nloops[0], nloops[1]); - printf("%s:\tErrors\t%ld\t%ld\n", __FUNCTION__, nerrors[0], nerrors[1]); + printf("\t\tThread1\tThread2\n"); + printf("\tLoops\t%ld\t%ld\n", nloops[0], nloops[1]); + printf("\tErrors\t%ld\t%ld\n", nerrors[0], nerrors[1]); } |