summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-26 15:14:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-30 11:16:28 +0200
commit1215fd4d9426a59d568560e9a485628560363133 (patch)
tree1fa51c2c86080bdbf80d20386732f34f08e708be /c/src
parentsmptests/smpatomic08: Fix race conditions (diff)
downloadrtems-1215fd4d9426a59d568560e9a485628560363133.tar.bz2
sapi: SMP support for chains
Add ISR lock to chain control for proper SMP protection. Replace rtems_chain_extract() with rtems_chain_explicit_extract() and rtems_chain_insert() with rtems_chain_explicit_insert() on SMP configurations. Use rtems_chain_explicit_extract() and rtems_chain_explicit_insert() to provide SMP support.
Diffstat (limited to 'c/src')
-rw-r--r--c/src/lib/libcpu/powerpc/mpc55xx/edma/edma.c2
-rw-r--r--c/src/libchip/ide/ata.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc55xx/edma/edma.c b/c/src/lib/libcpu/powerpc/mpc55xx/edma/edma.c
index 7b9eab422a..0856ad7535 100644
--- a/c/src/lib/libcpu/powerpc/mpc55xx/edma/edma.c
+++ b/c/src/lib/libcpu/powerpc/mpc55xx/edma/edma.c
@@ -275,7 +275,7 @@ void mpc55xx_edma_release_channel(edma_channel_context *ctx)
unsigned channel_index = edma_channel_index_of_tcd(ctx->edma_tcd);
mpc55xx_edma_release_channel_by_tcd(ctx->edma_tcd);
- rtems_chain_extract(&ctx->node);
+ rtems_chain_explicit_extract(&edma_channel_chain, &ctx->node);
sc = rtems_interrupt_handler_remove(
MPC55XX_IRQ_EDMA(channel_index),
diff --git a/c/src/libchip/ide/ata.c b/c/src/libchip/ide/ata.c
index 8229714035..64238b7386 100644
--- a/c/src/libchip/ide/ata.c
+++ b/c/src/libchip/ide/ata.c
@@ -491,7 +491,7 @@ ata_request_done(ata_req_t *areq, rtems_device_minor_number ctrl_minor,
#endif
ATA_EXEC_CALLBACK(areq, status);
- rtems_chain_extract(&areq->link);
+ rtems_chain_explicit_extract(&ata_ide_ctrls[ctrl_minor].reqs, &areq->link);
if (!rtems_chain_is_empty(&ata_ide_ctrls[ctrl_minor].reqs))
{