Changes in uspace/lib/c/generic/net/packet.c [16ac756:c69d327] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/net/packet.c
r16ac756 rc69d327 41 41 #include <unistd.h> 42 42 #include <errno.h> 43 #include <err.h> 43 44 44 45 #include <sys/mman.h> … … 90 91 int pm_init(void) 91 92 { 92 int rc;93 ERROR_DECLARE; 93 94 94 95 fibril_rwlock_initialize(&pm_globals.lock); 95 96 96 fibril_rwlock_write_lock(&pm_globals.lock); 97 rc = gpm_initialize(&pm_globals.packet_map);97 ERROR_PROPAGATE(gpm_initialize(&pm_globals.packet_map)); 98 98 fibril_rwlock_write_unlock(&pm_globals.lock); 99 100 return rc; 99 return EOK; 101 100 } 102 101 … … 140 139 int pm_add(packet_t packet) 141 140 { 141 ERROR_DECLARE; 142 142 143 packet_map_ref map; 143 int rc;144 144 145 145 if (!packet_is_valid(packet)) … … 160 160 } 161 161 bzero(map, sizeof(packet_map_t)); 162 rc = gpm_add(&pm_globals.packet_map, map);163 if (rc< 0) {162 if ((ERROR_CODE = 163 gpm_add(&pm_globals.packet_map, map)) < 0) { 164 164 fibril_rwlock_write_unlock(&pm_globals.lock); 165 165 free(map); 166 return rc;166 return ERROR_CODE; 167 167 } 168 168 } while (PACKET_MAP_PAGE(packet->packet_id) >=
Note:
See TracChangeset
for help on using the changeset viewer.