Subversion Repositories HelenOS

Rev

Rev 4704 | Rev 4743 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4704 Rev 4731
Line 107... Line 107...
107
 *  @param order The packet order value. Input parameter.
107
 *  @param order The packet order value. Input parameter.
108
 *  @param metric The metric value of the packet. Input parameter.
108
 *  @param metric The metric value of the packet. Input parameter.
109
 *  @returns The first packet of the queue. The original first packet may be shifted by the new packet.
109
 *  @returns The first packet of the queue. The original first packet may be shifted by the new packet.
110
 *  @returns NULL if the packet is not valid.
110
 *  @returns NULL if the packet is not valid.
111
 */
111
 */
112
packet_t    pq_add( packet_t first, packet_t packet, int order, size_t metric );
112
packet_t    pq_add( packet_t first, packet_t packet, size_t order, size_t metric );
-
 
113
 
-
 
114
/** Finds the packet with the given order.
-
 
115
 *  @param first The first packet of the queue. Input parameter.
-
 
116
 *  @param order The packet order value. Input parameter.
-
 
117
 *  @returns The packet with the given order.
-
 
118
 *  @returns NULL if the first packet is not valid.
-
 
119
 *  @returns NULL if the packet is not found.
-
 
120
 */
-
 
121
packet_t    pq_find( packet_t first, size_t order );
113
 
122
 
114
/** Inserts packet after the given one.
123
/** Inserts packet after the given one.
115
 *  @param packet The packet in the queue. Input parameter.
124
 *  @param packet The packet in the queue. Input parameter.
116
 *  @param new_packet The new packet to be inserted.
125
 *  @param new_packet The new packet to be inserted. Input parameter.
117
 *  @returns EOK on success.
126
 *  @returns EOK on success.
118
 *  @returns EINVAL if etiher of the packets is invalid.
127
 *  @returns EINVAL if etiher of the packets is invalid.
119
 */
128
 */
120
int pq_insert_after( packet_t packet, packet_t new_packet );
129
int pq_insert_after( packet_t packet, packet_t new_packet );
121
 
130
 
Line 129... Line 138...
129
 
138
 
130
/** Sets the packet order and metric attributes.
139
/** Sets the packet order and metric attributes.
131
 *  @param packet The packet to be set. Input parameter.
140
 *  @param packet The packet to be set. Input parameter.
132
 *  @param order The packet order value. Input parameter.
141
 *  @param order The packet order value. Input parameter.
133
 *  @param metric The metric value of the packet. Input parameter.
142
 *  @param metric The metric value of the packet. Input parameter.
-
 
143
 *  @returns EOK on success.
-
 
144
 *  @returns EINVAL if the packet is invalid..
-
 
145
 */
-
 
146
int pq_set_order( packet_t packet, size_t order, size_t metric );
-
 
147
 
-
 
148
/** Sets the packet order and metric attributes.
-
 
149
 *  @param packet The packet to be set. Input parameter.
-
 
150
 *  @param order The packet order value. Output parameter.
-
 
151
 *  @param metric The metric value of the packet. Ouput parameter.
-
 
152
 *  @returns EOK on success.
-
 
153
 *  @returns EINVAL if the packet is invalid..
134
 */
154
 */
135
int pq_set( packet_t packet, int order, size_t metric );
155
int pq_get_order( packet_t packet, size_t * order, size_t * metric );
136
 
156
 
137
/** Releases the whole queue.
157
/** Releases the whole queue.
138
 *  Detaches all packets of the queue and calls the packet_release() for each of them.
158
 *  Detaches all packets of the queue and calls the packet_release() for each of them.
139
 *  @param first The first packet of the queue. Input parameter.
159
 *  @param first The first packet of the queue. Input parameter.
140
 *  @param packet_release The releasing function called for each of the packets after its detachment. Input parameter.
160
 *  @param packet_release The releasing function called for each of the packets after its detachment. Input parameter.