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


Ignore:
Timestamp:
2010-04-28T21:12:04Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c050399
Parents:
b8f7ea78 (diff), 55821eea (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 blocking and locking improvements and fixes.

File:
1 edited

Legend:

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

    rb8f7ea78 rc2ab3f4  
    555555 * Initialize mag_cache structure in slab cache
    556556 */
    557 static void make_magcache(slab_cache_t *cache)
     557static bool make_magcache(slab_cache_t *cache)
    558558{
    559559        unsigned int i;
     
    562562
    563563        cache->mag_cache = malloc(sizeof(slab_mag_cache_t) * config.cpu_count,
    564             0);
     564            FRAME_ATOMIC);
     565        if (!cache->mag_cache)
     566                return false;
     567
    565568        for (i = 0; i < config.cpu_count; i++) {
    566569                memsetb(&cache->mag_cache[i], sizeof(cache->mag_cache[i]), 0);
     
    568571                    "slab_maglock_cpu");
    569572        }
     573        return true;
    570574}
    571575
     
    597601        spinlock_initialize(&cache->maglock, "slab_maglock");
    598602        if (!(cache->flags & SLAB_CACHE_NOMAGAZINE))
    599                 make_magcache(cache);
     603                (void) make_magcache(cache);
    600604
    601605        /* Compute slab sizes, object counts in slabs etc. */
     
    923927                    SLAB_CACHE_MAGDEFERRED)
    924928                        continue;
    925                 make_magcache(s);
     929                (void) make_magcache(s);
    926930                s->flags &= ~SLAB_CACHE_MAGDEFERRED;
    927931        }
Note: See TracChangeset for help on using the changeset viewer.