Every prototype method implemented so far makes use of FIFO queues to
keep track of pending operations. Operations are described by generic
operation structures that include common parameters (such as buffer
size and location). This structure also includes abstract storage space
for private method specific parameters (such as flow control or device
management information). The operation queue mechanism in BMI is based
on the doubly linked list implementation found in the Linux kernel.
- op_queue_new(): Creates a new operation queue.
- op_queue_cleanup(): Destroys an existing
operation queue as well as any operations contained within it.
- op_queue_add(): Adds a
method operation onto the tail of a queue.
- op_queue_remove(): Removes a specific
operation from the queue in which it resides.
- op_queue_search(): Searches for
an operation that matches the characteristics specified a given key. All
searches begin at the head of the target operation queue.
- op_queue_empty(): Determines whether a
queue is empty or not.
- op_queue_count(): Counts the number of
entries within an operation queue. This function requires iteration
through every element of the queue. It is therefore only suitable for
debugging purposes in which performance is not critical.
- op_queue_dump(): Prints out
information about every operation in the queue. Only used for debugging
and prototyping purposes.
Two related functions are also provided for managing the creation of
operation structures:
- alloc_method_op(): Allocates a new
operation structure.
- dealloc_method_op(): Deallocates an existing
method operation.