109,11 → 109,20 |
* @returns The first packet of the queue. The original first packet may be shifted by the new packet. |
* @returns NULL if the packet is not valid. |
*/ |
packet_t pq_add( packet_t first, packet_t packet, int order, size_t metric ); |
packet_t pq_add( packet_t first, packet_t packet, size_t order, size_t metric ); |
|
/** Finds the packet with the given order. |
* @param first The first packet of the queue. Input parameter. |
* @param order The packet order value. Input parameter. |
* @returns The packet with the given order. |
* @returns NULL if the first packet is not valid. |
* @returns NULL if the packet is not found. |
*/ |
packet_t pq_find( packet_t first, size_t order ); |
|
/** Inserts packet after the given one. |
* @param packet The packet in the queue. Input parameter. |
* @param new_packet The new packet to be inserted. |
* @param new_packet The new packet to be inserted. Input parameter. |
* @returns EOK on success. |
* @returns EINVAL if etiher of the packets is invalid. |
*/ |
131,9 → 140,20 |
* @param packet The packet to be set. Input parameter. |
* @param order The packet order value. Input parameter. |
* @param metric The metric value of the packet. Input parameter. |
* @returns EOK on success. |
* @returns EINVAL if the packet is invalid.. |
*/ |
int pq_set( packet_t packet, int order, size_t metric ); |
int pq_set_order( packet_t packet, size_t order, size_t metric ); |
|
/** Sets the packet order and metric attributes. |
* @param packet The packet to be set. Input parameter. |
* @param order The packet order value. Output parameter. |
* @param metric The metric value of the packet. Ouput parameter. |
* @returns EOK on success. |
* @returns EINVAL if the packet is invalid.. |
*/ |
int pq_get_order( packet_t packet, size_t * order, size_t * metric ); |
|
/** Releases the whole queue. |
* Detaches all packets of the queue and calls the packet_release() for each of them. |
* @param first The first packet of the queue. Input parameter. |