Changeset f1fae414 in mainline for kernel/generic/src/mm/slab.c


Ignore:
Timestamp:
2011-06-22T01:34:53Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d7e82c1, cac458f
Parents:
72ec8cc (diff), bf172825 (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 mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/slab.c

    r72ec8cc rf1fae414  
    317317                spinlock_lock(&cache->slablock);
    318318        } else {
    319                 slab = list_get_instance(cache->partial_slabs.next, slab_t,
    320                     link);
     319                slab = list_get_instance(list_first(&cache->partial_slabs),
     320                    slab_t, link);
    321321                list_remove(&slab->link);
    322322        }
     
    360360        if (!list_empty(&cache->magazines)) {
    361361                if (first)
    362                         cur = cache->magazines.next;
     362                        cur = list_first(&cache->magazines);
    363363                else
    364                         cur = cache->magazines.prev;
     364                        cur = list_last(&cache->magazines);
    365365               
    366366                mag = list_get_instance(cur, slab_magazine_t, link);
     
    812812       
    813813        size_t frames = 0;
    814         link_t *cur;
    815         for (cur = slab_cache_list.next; cur != &slab_cache_list;
    816             cur = cur->next) {
     814        list_foreach(slab_cache_list, cur) {
    817815                slab_cache_t *cache = list_get_instance(cur, slab_cache_t, link);
    818816                frames += _slab_reclaim(cache, flags);
     
    861859                link_t *cur;
    862860                size_t i;
    863                 for (i = 0, cur = slab_cache_list.next;
    864                     (i < skip) && (cur != &slab_cache_list);
     861                for (i = 0, cur = slab_cache_list.head.next;
     862                    (i < skip) && (cur != &slab_cache_list.head);
    865863                    i++, cur = cur->next);
    866864               
    867                 if (cur == &slab_cache_list) {
     865                if (cur == &slab_cache_list.head) {
    868866                        irq_spinlock_unlock(&slab_cache_lock, true);
    869867                        break;
     
    940938        irq_spinlock_lock(&slab_cache_lock, false);
    941939       
    942         link_t *cur;
    943         for (cur = slab_cache_list.next; cur != &slab_cache_list;
    944             cur = cur->next) {
     940        list_foreach(slab_cache_list, cur) {
    945941                slab_cache_t *slab = list_get_instance(cur, slab_cache_t, link);
    946942                if ((slab->flags & SLAB_CACHE_MAGDEFERRED) !=
Note: See TracChangeset for help on using the changeset viewer.