Changeset 46d4d9f in mainline for uspace/lib/c/generic/net/packet.c
- Timestamp:
- 2010-11-20T17:04:59Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dd5046dd
- Parents:
- fdbc3ff
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/net/packet.c
rfdbc3ff r46d4d9f 62 62 63 63 /** Type definition of the packet map page. */ 64 typedef packet_t packet_map_t[PACKET_MAP_SIZE];64 typedef packet_t *packet_map_t[PACKET_MAP_SIZE]; 65 65 66 66 /** Packet map. … … 104 104 * @return NULL if the mapping does not exist. 105 105 */ 106 packet_t pm_find(packet_id_t packet_id)106 packet_t *pm_find(packet_id_t packet_id) 107 107 { 108 108 packet_map_t *map; 109 packet_t packet;109 packet_t *packet; 110 110 111 111 if (!packet_id) … … 135 135 * @return ENOMEM if there is not enough memory left. 136 136 */ 137 int pm_add(packet_t packet)137 int pm_add(packet_t *packet) 138 138 { 139 139 packet_map_t *map; … … 178 178 int index; 179 179 packet_map_t *map; 180 packet_t packet;180 packet_t *packet; 181 181 182 182 fibril_rwlock_write_lock(&pm_globals.lock); … … 209 209 * @return EINVAL if the packet is not valid. 210 210 */ 211 int pq_add(packet_t * first, packet_tpacket, size_t order, size_t metric)212 { 213 packet_t item;211 int pq_add(packet_t **first, packet_t *packet, size_t order, size_t metric) 212 { 213 packet_t *item; 214 214 215 215 if (!first || !packet_is_valid(packet)) … … 253 253 * @return NULL if the packet is not found. 254 254 */ 255 packet_t pq_find(packet_tpacket, size_t order)256 { 257 packet_t item;255 packet_t *pq_find(packet_t *packet, size_t order) 256 { 257 packet_t *item; 258 258 259 259 if (!packet_is_valid(packet)) … … 278 278 * @return EINVAL if etiher of the packets is invalid. 279 279 */ 280 int pq_insert_after(packet_t packet, packet_tnew_packet)281 { 282 packet_t item;280 int pq_insert_after(packet_t *packet, packet_t *new_packet) 281 { 282 packet_t *item; 283 283 284 284 if (!packet_is_valid(packet) || !packet_is_valid(new_packet)) … … 303 303 * @return NULL if the packet is not valid. 304 304 */ 305 packet_t pq_detach(packet_tpacket)306 { 307 packet_t next;308 packet_t previous;305 packet_t *pq_detach(packet_t *packet) 306 { 307 packet_t *next; 308 packet_t *previous; 309 309 310 310 if (!packet_is_valid(packet)) … … 331 331 * @return EINVAL if the packet is invalid. 332 332 */ 333 int pq_set_order(packet_t packet, size_t order, size_t metric)333 int pq_set_order(packet_t *packet, size_t order, size_t metric) 334 334 { 335 335 if (!packet_is_valid(packet)) … … 349 349 * @return EINVAL if the packet is invalid. 350 350 */ 351 int pq_get_order(packet_t packet, size_t *order, size_t *metric)351 int pq_get_order(packet_t *packet, size_t *order, size_t *metric) 352 352 { 353 353 if (!packet_is_valid(packet)) … … 372 372 * packets after its detachment. 373 373 */ 374 void pq_destroy(packet_t first, void (*packet_release)(packet_tpacket))375 { 376 packet_t actual;377 packet_t next;374 void pq_destroy(packet_t *first, void (*packet_release)(packet_t *packet)) 375 { 376 packet_t *actual; 377 packet_t *next; 378 378 379 379 actual = first; … … 395 395 * @return NULL if the packet is not valid. 396 396 */ 397 packet_t pq_next(packet_tpacket)397 packet_t *pq_next(packet_t *packet) 398 398 { 399 399 if (!packet_is_valid(packet)) … … 410 410 * @return NULL if the packet is not valid. 411 411 */ 412 packet_t pq_previous(packet_tpacket)412 packet_t *pq_previous(packet_t *packet) 413 413 { 414 414 if (!packet_is_valid(packet))
Note:
See TracChangeset
for help on using the changeset viewer.