Fork us on GitHub Follow us on Facebook Follow us on Twitter

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


Ignore:
Timestamp:
2012-05-08T08:34:16Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
ddb56be
Parents:
25ebfbd
Message:

Add assertions to stress the fact that the slab allocator spinlocks are
always taken with interrupts disabled.

File:
1 edited

Legend:

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

    r25ebfbd rc8d0f9e5  
    254254    slab_t *slab)
    255255{
     256        ASSERT(interrupts_disabled());
     257
    256258        if (!slab)
    257259                slab = obj2slab(obj);
     
    295297NO_TRACE static void *slab_obj_create(slab_cache_t *cache, unsigned int flags)
    296298{
     299        ASSERT(interrupts_disabled());
     300
    297301        spinlock_lock(&cache->slablock);
    298302       
     
    355359        link_t *cur;
    356360       
     361        ASSERT(interrupts_disabled());
     362
    357363        spinlock_lock(&cache->maglock);
    358364        if (!list_empty(&cache->magazines)) {
     
    377383    slab_magazine_t *mag)
    378384{
     385        ASSERT(interrupts_disabled());
     386
    379387        spinlock_lock(&cache->maglock);
    380388       
Note: See TracChangeset for help on using the changeset viewer.