1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /*
- * Copyright 2011 Institute of Communication and Computer Systems (ICCS)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
- /**
- * \file fifo_order.h
- * \author Ioannis Koutras (joko@microlab.ntua.gr)
- * \date January, 2012
- *
- * \brief Add a block in a FIFO-ordered linked list.
- */
- #ifndef FIFO_ORDER_H
- #define FIFO_ORDER_H
- #ifdef COUNT_HOPS
- #include <dmmlib/heap.h>
- #endif /* COUNT_HOPS */
- #include "dmm_config.h"
- #ifdef FIFO_SORT_POLICY
- #ifdef COUNT_HOPS
- #define add_block(heap, block, head, tail) add_block_fifo_order(heap, block, head, tail)
- #else /* COUNT_HOPS */
- #define add_block(block, head, tail) add_block_fifo_order(block, head, tail)
- #endif /* COUNT_HOPS */
- #endif /* FIFO_SORT_POLICY */
- /**
- * Adds a block in a LIFO-ordered list.
- *
- * @param block The pointer of the data part of the block to be added.
- * @param head_node The pointer to the head memory block of the list.
- * @param tail_node The pointer to the tail memory block of the list.
- */
- void add_block_fifo_order(
- #ifdef COUNT_HOPS
- heap_t *heap, /**< A pointer to the heap which manages the block. */
- #endif /* COUNT_HOPS */
- void **block,
- void **head_node,
- void **tail_node);
- #endif /* FIFO_ORDER_H */
|