forked from Imagelibrary/rtems
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:
@@ -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),
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user