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