diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-31 13:56:56 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-31 15:20:30 +0200 |
commit | ac2bb464a5948ff0b3ae4bb5bd4434735e6c0e04 (patch) | |
tree | d06af96753409c3ec551b7ea0b73ee7f4031dcd4 | |
parent | smp: Move secondary CPU initialization request (diff) | |
download | rtems-ac2bb464a5948ff0b3ae4bb5bd4434735e6c0e04.tar.bz2 |
smptests: Use priority ceiling for locked print
In case the printf() blocks on a semaphore it was possible to end up in
a livelock.
-rw-r--r-- | testsuites/smptests/smp08/init.c | 2 | ||||
-rw-r--r-- | testsuites/support/src/locked_print.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/testsuites/smptests/smp08/init.c b/testsuites/smptests/smp08/init.c index 1c03cec8a3..8e8de7c052 100644 --- a/testsuites/smptests/smp08/init.c +++ b/testsuites/smptests/smp08/init.c @@ -78,7 +78,7 @@ rtems_task Init( sprintf(ch, "%02" PRId32, i ); status = rtems_task_create( rtems_build_name( 'T', 'A', ch[0], ch[1] ), - 1, + 2, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/support/src/locked_print.c b/testsuites/support/src/locked_print.c index 62e72bf47c..8a901c9219 100644 --- a/testsuites/support/src/locked_print.c +++ b/testsuites/support/src/locked_print.c @@ -36,7 +36,8 @@ void locked_print_initialize(void) rtems_build_name ('S', 'E', 'M', '1'), 1, RTEMS_LOCAL | - RTEMS_SIMPLE_BINARY_SEMAPHORE | + RTEMS_BINARY_SEMAPHORE | + RTEMS_PRIORITY_CEILING | RTEMS_PRIORITY, 1, &locked_print_semaphore |