[rtems-libbsd commit] rwlock01: Do not print in the worker task

Sebastian Huber sebh at rtems.org
Mon Dec 16 14:29:33 UTC 2013


Module:    rtems-libbsd
Branch:    master
Commit:    1153f0c228341233d6c64128434bd61701f8b1d8
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=1153f0c228341233d6c64128434bd61701f8b1d8

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Dec  5 14:03:51 2013 +0100

rwlock01: Do not print in the worker task

The worker task must not block on the console device shared with the
master task.

---

 testsuite/rwlock01/test_main.c |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/testsuite/rwlock01/test_main.c b/testsuite/rwlock01/test_main.c
index 8f2cffc..2f5efaf 100644
--- a/testsuite/rwlock01/test_main.c
+++ b/testsuite/rwlock01/test_main.c
@@ -88,8 +88,6 @@ worker_task(rtems_task_argument arg)
 	test_context *ctx = (test_context *) arg;
 	struct rwlock *rw = &ctx->rw;
 
-	puts("worker ready");
-
 	while (true) {
 		rtems_status_code sc;
 		rtems_event_set events;
@@ -103,43 +101,31 @@ worker_task(rtems_task_argument arg)
 		assert(sc == RTEMS_SUCCESSFUL);
 
 		if ((events & EVENT_RLOCK) != 0) {
-			puts("worker: rw_rlock");
-
 			rw_rlock(rw);
 			ctx->done = true;
 		}
 
 		if ((events & EVENT_WLOCK) != 0) {
-			puts("worker: rw_wlock");
-
 			rw_wlock(rw);
 			ctx->done = true;
 		}
 
 		if ((events & EVENT_TRY_RLOCK) != 0) {
-			puts("worker: rw_try_rlock");
-
 			ctx->rv = rw_try_rlock(rw);
 			ctx->done = true;
 		}
 
 		if ((events & EVENT_TRY_WLOCK) != 0) {
-			puts("worker: rw_try_wlock");
-
 			ctx->rv = rw_try_wlock(rw);
 			ctx->done = true;
 		}
 
 		if ((events & EVENT_UNLOCK) != 0) {
-			puts("worker: rw_unlock");
-
 			rw_unlock(rw);
 			ctx->done = true;
 		}
 
 		if ((events & EVENT_SLEEP) != 0) {
-			puts("worker: rw_sleep");
-
 			ctx->rv = rw_sleep(ctx, rw, 0, "worker", ctx->timo);
 			ctx->done = true;
 		}




More information about the vc mailing list