Changes in kernel/generic/src/mm/slab.c [ab6f2507:7ce7cfb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/slab.c
rab6f2507 r7ce7cfb 180 180 unsigned int flags) 181 181 { 182 183 184 182 size_t zone = 0; 185 183 … … 317 315 spinlock_lock(&cache->slablock); 318 316 } else { 319 slab = list_get_instance( cache->partial_slabs.next, slab_t,320 link);317 slab = list_get_instance(list_first(&cache->partial_slabs), 318 slab_t, link); 321 319 list_remove(&slab->link); 322 320 } … … 360 358 if (!list_empty(&cache->magazines)) { 361 359 if (first) 362 cur = cache->magazines.next;360 cur = list_first(&cache->magazines); 363 361 else 364 cur = cache->magazines.prev;362 cur = list_last(&cache->magazines); 365 363 366 364 mag = list_get_instance(cur, slab_magazine_t, link); … … 812 810 813 811 size_t frames = 0; 814 link_t *cur; 815 for (cur = slab_cache_list.next; cur != &slab_cache_list; 816 cur = cur->next) { 812 list_foreach(slab_cache_list, cur) { 817 813 slab_cache_t *cache = list_get_instance(cur, slab_cache_t, link); 818 814 frames += _slab_reclaim(cache, flags); … … 861 857 link_t *cur; 862 858 size_t i; 863 for (i = 0, cur = slab_cache_list. next;864 (i < skip) && (cur != &slab_cache_list );859 for (i = 0, cur = slab_cache_list.head.next; 860 (i < skip) && (cur != &slab_cache_list.head); 865 861 i++, cur = cur->next); 866 862 867 if (cur == &slab_cache_list ) {863 if (cur == &slab_cache_list.head) { 868 864 irq_spinlock_unlock(&slab_cache_lock, true); 869 865 break; … … 940 936 irq_spinlock_lock(&slab_cache_lock, false); 941 937 942 link_t *cur; 943 for (cur = slab_cache_list.next; cur != &slab_cache_list; 944 cur = cur->next) { 938 list_foreach(slab_cache_list, cur) { 945 939 slab_cache_t *slab = list_get_instance(cur, slab_cache_t, link); 946 940 if ((slab->flags & SLAB_CACHE_MAGDEFERRED) !=
Note:
See TracChangeset
for help on using the changeset viewer.