/* This file contains some function for controlling the access to the */ /* ST-DMA chip that may be shared between devices. Currently we have: */ /* TT: Floppy and ACSI bus */ /* Falcon: Floppy and SCSI */ /* */ /* The controlling functions set up a wait queue for access to the */ /* ST-DMA chip. Callers to stdma_lock() that cannot granted access are */ /* put onto a queue and waked up later if the owner calls */ /* stdma_release(). Additionally, the caller gives his interrupt */ /* service routine to stdma_lock(). */ /* */ /* On the Falcon, the IDE bus uses just the ACSI/Floppy interrupt, but */ /* not the ST-DMA chip itself. So falhd.c needs not to lock the */ /* chip. The interrupt is routed to falhd.c if IDE is configured, the */ /* model is a Falcon and the interrupt was caused by the HD controller */ /* (can be determined by looking at its status register). */
staticint stdma_locked; /* the semaphore */ /* int func to be called */ static irq_handler_t stdma_isr; staticvoid *stdma_isr_data; /* data passed to isr */ static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */
void stdma_lock(irq_handler_t handler, void *data)
{ /* Since the DMA is used for file system purposes, we havetosleepuninterruptible(theremaybelocked
buffers) */
wait_event(stdma_wait, stdma_try_lock(handler, data));
}
EXPORT_SYMBOL(stdma_lock);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.