Changeset f959a20f in mainline for uspace/lib/nic/src/nic_driver.c
- Timestamp:
- 2019-02-01T22:32:38Z (5 years ago)
- Children:
- 00b7fc8
- Parents:
- 1a37496
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-01 21:22:39)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-01 22:32:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/src/nic_driver.c
r1a37496 rf959a20f 329 329 330 330 if (nic_globals.frame_list_cache_size > 0) { 331 frames = 332 list_get_instance(list_first(&nic_globals.frame_list_cache), 333 nic_frame_list_t, head); 334 list_remove(&frames->head); 335 list_initialize(frames); 331 frames = list_pop(&nic_globals.frame_list_cache, 332 nic_frame_list_t, link); 333 assert(frames); 334 list_initialize(&frames->list); 336 335 nic_globals.frame_list_cache_size--; 337 336 fibril_mutex_unlock(&nic_globals.lock); … … 341 340 frames = malloc(sizeof (nic_frame_list_t)); 342 341 if (frames != NULL) 343 list_initialize( frames);342 list_initialize(&frames->list); 344 343 } 345 344 … … 356 355 free(frames); 357 356 } else { 358 list_prepend(&frames-> head, &nic_globals.frame_list_cache);357 list_prepend(&frames->link, &nic_globals.frame_list_cache); 359 358 nic_globals.frame_list_cache_size++; 360 359 fibril_mutex_unlock(&nic_globals.lock); … … 372 371 { 373 372 assert(frame != NULL && frames != NULL); 374 list_append(&frame->link, frames);373 list_append(&frame->link, &frames->list); 375 374 } 376 375 … … 576 575 if (frames == NULL) 577 576 return; 578 while (!list_empty(frames)) { 579 nic_frame_t *frame = 580 list_get_instance(list_first(frames), nic_frame_t, link); 581 582 list_remove(&frame->link); 577 while (!list_empty(&frames->list)) { 578 nic_frame_t *frame = list_pop(&frames->list, nic_frame_t, link); 583 579 nic_received_frame(nic_data, frame); 584 580 }
Note:
See TracChangeset
for help on using the changeset viewer.