summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/block06
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-10 08:15:37 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-11 10:58:09 +0100
commitae88aa7927dbbfb7b841dee8133f55c38303b91b (patch)
tree2b2b447a0c4a7848fb493044453226f0ec883545 /testsuites/libtests/block06
parentprintk: Add support for long long (diff)
downloadrtems-ae88aa7927dbbfb7b841dee8133f55c38303b91b.tar.bz2
sapi: Use one SMP lock for all chains
This partially reverts commit 1215fd4d9426a59d568560e9a485628560363133. In order to support profiling of SMP locks and provide a future compatible SMP locks API it is necessary to add an SMP lock destroy function. Since the commit above adds an SMP lock to each chain control we would have to add a rtems_chain_destroy() function as well. This complicates the chain usage dramatically. Thus revert the patch above. A global SMP lock for all chains is used to implement the protected chain operations. Advantages: * The SAPI chain API is now identical on SMP and non-SMP configurations. * The size of the chain control is reduced and is then equal to the Score chains. * The protected chain operations work correctly on SMP. Disadvantage: * Applications using many different chains and the protected operations may notice lock contention. The chain control size drop is a huge benefit (SAPI chain controls are 66% larger than the Score chain controls). The only disadvantage is not really a problem since these applications can use specific interrupt locks and unprotected chain operations to avoid this issue.
Diffstat (limited to 'testsuites/libtests/block06')
-rw-r--r--testsuites/libtests/block06/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuites/libtests/block06/init.c b/testsuites/libtests/block06/init.c
index e51bf2791c..6352aba933 100644
--- a/testsuites/libtests/block06/init.c
+++ b/testsuites/libtests/block06/init.c
@@ -1130,14 +1130,14 @@ bdbuf_tests_task_0_test_8 (bdbuf_task_control* tc)
bd = (rtems_bdbuf_buffer*) node;
pnode = node->previous;
- rtems_chain_explicit_extract (&buffers, node);
+ rtems_chain_extract (node);
node = pnode;
bdbuf_test_printf ("%s: rtems_bdbuf_release_modified[4]: ", tc->name);
passed = bdbuf_test_print_sc (rtems_bdbuf_release_modified (bd), true);
bd = (rtems_bdbuf_buffer*) node;
pnode = node->previous;
- rtems_chain_explicit_extract (&buffers, node);
+ rtems_chain_extract (node);
node = pnode;
bdbuf_test_printf ("%s: rtems_bdbuf_release_modified[3]: ", tc->name);
passed = bdbuf_test_print_sc (rtems_bdbuf_release_modified (bd), true);