diff options
author | Glenn Humphrey <glenn.humphrey@oarcorp.com> | 2009-12-17 20:09:11 +0000 |
---|---|---|
committer | Glenn Humphrey <glenn.humphrey@oarcorp.com> | 2009-12-17 20:09:11 +0000 |
commit | c7ee08547586d127741ed426d0deac2d378ed9d8 (patch) | |
tree | 4e566d61e1469238ba5b19fc0bdbf6e6724db0d5 /led/posix_cond_server/test.c | |
parent | 2009-12-14 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-examples-c7ee08547586d127741ed426d0deac2d378ed9d8.tar.bz2 |
2009-12-17 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* delay/init.c, event_server/init.c, msg_server/init.c,
posix_cond_server/test.c, posix_delay_nanosleep/test.c,
posix_delay_sleep/test.c, posix_mutex_server/test.c, ratemon1/init.c,
ratemon2/init.c, ratemon_cond_server/test.c, sem_server/init.c,
timeout_event/init.c: Cleaned up the led examples to produce similiar
output.
* timer_server/.cvsignore: New file.
Diffstat (limited to 'led/posix_cond_server/test.c')
-rw-r--r-- | led/posix_cond_server/test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/led/posix_cond_server/test.c b/led/posix_cond_server/test.c index c476ed0..61da7e2 100644 --- a/led/posix_cond_server/test.c +++ b/led/posix_cond_server/test.c @@ -27,13 +27,13 @@ void *Server( if ( status ) fprintf( stderr, "Server - lock did not work (%d)\n", status ); - for ( ; ; ) { + for (count=0; ; count++) { status = pthread_cond_wait( &Condition, &Mutex ); if ( status ) fprintf( stderr, "Server - condition wait did not work (%d)\n", status ); - if ((++count % 2) == 0) + if ((count % 2) == 0) LED_OFF(); else LED_ON(); @@ -46,7 +46,7 @@ void *POSIX_Init( ) { pthread_t thread_id; - int status; + int status; puts( "\n\n*** LED BLINKER -- sleep with pthread condition variables ***" ); |