Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 9ce7eb5 in mainline for uspace/lib/c/generic/net/packet.c


Ignore:
Timestamp:
2010-11-07T19:49:00Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
3090715
Parents:
3da12d74 (diff), 16ac756 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/net.

File:
1 edited

Legend:

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

    r3da12d74 r9ce7eb5  
    4141#include <unistd.h>
    4242#include <errno.h>
    43 #include <err.h>
    4443
    4544#include <sys/mman.h>
     
    9190int pm_init(void)
    9291{
    93         ERROR_DECLARE;
     92        int rc;
    9493
    9594        fibril_rwlock_initialize(&pm_globals.lock);
     95       
    9696        fibril_rwlock_write_lock(&pm_globals.lock);
    97         ERROR_PROPAGATE(gpm_initialize(&pm_globals.packet_map));
     97        rc = gpm_initialize(&pm_globals.packet_map);
    9898        fibril_rwlock_write_unlock(&pm_globals.lock);
    99         return EOK;
     99       
     100        return rc;
    100101}
    101102
     
    139140int pm_add(packet_t packet)
    140141{
    141         ERROR_DECLARE;
    142 
    143142        packet_map_ref map;
     143        int rc;
    144144
    145145        if (!packet_is_valid(packet))
     
    160160                        }
    161161                        bzero(map, sizeof(packet_map_t));
    162                         if ((ERROR_CODE =
    163                             gpm_add(&pm_globals.packet_map, map)) < 0) {
     162                        rc = gpm_add(&pm_globals.packet_map, map);
     163                        if (rc < 0) {
    164164                                fibril_rwlock_write_unlock(&pm_globals.lock);
    165165                                free(map);
    166                                 return ERROR_CODE;
     166                                return rc;
    167167                        }
    168168                } while (PACKET_MAP_PAGE(packet->packet_id) >=
Note: See TracChangeset for help on using the changeset viewer.