Changeset 46d4d9f in mainline for uspace/lib/c/generic/net/packet.c


Ignore:
Timestamp:
2010-11-20T17:04:59Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dd5046dd
Parents:
fdbc3ff
Message:

Redefine packet_t to be just a type alias for struct packet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/net/packet.c

    rfdbc3ff r46d4d9f  
    6262
    6363/** Type definition of the packet map page. */
    64 typedef packet_t packet_map_t[PACKET_MAP_SIZE];
     64typedef packet_t *packet_map_t[PACKET_MAP_SIZE];
    6565
    6666/** Packet map.
     
    104104 * @return              NULL if the mapping does not exist.
    105105 */
    106 packet_t pm_find(packet_id_t packet_id)
     106packet_t *pm_find(packet_id_t packet_id)
    107107{
    108108        packet_map_t *map;
    109         packet_t packet;
     109        packet_t *packet;
    110110
    111111        if (!packet_id)
     
    135135 * @return              ENOMEM if there is not enough memory left.
    136136 */
    137 int pm_add(packet_t packet)
     137int pm_add(packet_t *packet)
    138138{
    139139        packet_map_t *map;
     
    178178        int index;
    179179        packet_map_t *map;
    180         packet_t packet;
     180        packet_t *packet;
    181181
    182182        fibril_rwlock_write_lock(&pm_globals.lock);
     
    209209 * @return              EINVAL if the packet is not valid.
    210210 */
    211 int pq_add(packet_t * first, packet_t packet, size_t order, size_t metric)
    212 {
    213         packet_t item;
     211int pq_add(packet_t **first, packet_t *packet, size_t order, size_t metric)
     212{
     213        packet_t *item;
    214214
    215215        if (!first || !packet_is_valid(packet))
     
    253253 * @return              NULL if the packet is not found.
    254254 */
    255 packet_t pq_find(packet_t packet, size_t order)
    256 {
    257         packet_t item;
     255packet_t *pq_find(packet_t *packet, size_t order)
     256{
     257        packet_t *item;
    258258
    259259        if (!packet_is_valid(packet))
     
    278278 * @return              EINVAL if etiher of the packets is invalid.
    279279 */
    280 int pq_insert_after(packet_t packet, packet_t new_packet)
    281 {
    282         packet_t item;
     280int pq_insert_after(packet_t *packet, packet_t *new_packet)
     281{
     282        packet_t *item;
    283283
    284284        if (!packet_is_valid(packet) || !packet_is_valid(new_packet))
     
    303303 * @return              NULL if the packet is not valid.
    304304 */
    305 packet_t pq_detach(packet_t packet)
    306 {
    307         packet_t next;
    308         packet_t previous;
     305packet_t *pq_detach(packet_t *packet)
     306{
     307        packet_t *next;
     308        packet_t *previous;
    309309
    310310        if (!packet_is_valid(packet))
     
    331331 * @return              EINVAL if the packet is invalid.
    332332 */
    333 int pq_set_order(packet_t packet, size_t order, size_t metric)
     333int pq_set_order(packet_t *packet, size_t order, size_t metric)
    334334{
    335335        if (!packet_is_valid(packet))
     
    349349 * @return              EINVAL if the packet is invalid.
    350350 */
    351 int pq_get_order(packet_t packet, size_t *order, size_t *metric)
     351int pq_get_order(packet_t *packet, size_t *order, size_t *metric)
    352352{
    353353        if (!packet_is_valid(packet))
     
    372372 *                      packets after its detachment.
    373373 */
    374 void pq_destroy(packet_t first, void (*packet_release)(packet_t packet))
    375 {
    376         packet_t actual;
    377         packet_t next;
     374void pq_destroy(packet_t *first, void (*packet_release)(packet_t *packet))
     375{
     376        packet_t *actual;
     377        packet_t *next;
    378378
    379379        actual = first;
     
    395395 * @return              NULL if the packet is not valid.
    396396 */
    397 packet_t pq_next(packet_t packet)
     397packet_t *pq_next(packet_t *packet)
    398398{
    399399        if (!packet_is_valid(packet))
     
    410410 * @return              NULL if the packet is not valid.
    411411 */
    412 packet_t pq_previous(packet_t packet)
     412packet_t *pq_previous(packet_t *packet)
    413413{
    414414        if (!packet_is_valid(packet))
Note: See TracChangeset for help on using the changeset viewer.