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.
This commit is contained in:
Sebastian Huber
2013-08-26 15:14:33 +02:00
parent e127c4c9ea
commit 1215fd4d94
9 changed files with 326 additions and 64 deletions

View File

@@ -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),

View File

@@ -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))
{