
PCI CD and PCI CDa
Document Number: 008-00965-06 EDT Public Revision: I December 2004
Template: edt.dot
Page 15
2. When exiting the program, one of the following two conditions must be met before the EDT driver
is used again:
• All threads spawned by a main program must be joined with the main program after they exit and
before the main program exits; or
• If the main program does not wait for the child threads to exit, then any program that is run
following the main program must wait for all the child threads to exit. This waiting period
depends on system load and availability of certain system resources, such as a hardware memory
management unit.
Failure to meet one of these conditions results in undefined program and system behavior and program
and system crashes can occur.
DMA Library Routines
The DMA library provides a set of consistent routines across many of the EDT products, with simple
yet powerful ring-buffered DMA capabilities. Table 1, DMA Library Routines, lists the general DMA
library routines, described in an order corresponding roughly to their general usefulness.
Routine Description
Startup/Shutdown
edt_open Opens the EDT Product for application access.
edt_open_channel Opens a specific channel on the EDT Product for application
access.
edt_close Terminates access to the EDT Product and releases resources.
edt_parse_unit Parses an EDT device name string.
Input/Output
edt_read Single, application-level buffer read from the EDT Product.
edt_write Single, application-level buffer write to the EDT Product.
edt_start_buffers Begins DMA transfer from or to specified number of buffers.
edt_stop_buffers Stops DMA transfer after the current buffer(s) complete(s).
edt_check_for_buffers Checks whether the specified number of buffers have completed
without blocking.
edt_done_count Returns absolute (cumulative) number of completed buffers.
edt_get_todo Gets the number of buffers that the driver has been told to acquire.
edt_wait_for_buffers Blocks until the specified number of buffers have completed.
edt_wait_for_next_buffer Waits for the next buffer that completes DMA.
edt_wait_buffers_timed Blocks until the specified number of buffers have completed;
returns a pointer to the time that the last buffer finished.
edt_next_writebuf Returns a pointer to the next buffer scheduled for output DMA.
edt_set_buffer Sets which buffer should be started next.
edt_set_buffer_size Used to change the size or direction of one of the ring buffers.
edt_last_buffer Waits for the last buffer that has been transferred.
Comentarios a estos manuales