Changeset 551 for trunk/kernel/mm/ppm.c


Ignore:
Timestamp:
Sep 21, 2018, 10:24:34 PM (6 years ago)
Author:
nicolas.van.phan@…
Message:

Make locks before IDLE Init busy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/ppm.c

    r492 r551  
    200200        page_t   * remaining_block;
    201201        uint32_t   current_size;
    202  
     202
    203203#if DEBUG_PPM_ALLOC_PAGES
    204204uint32_t cycle = (uint32_t)hal_get_cycles();
     
    221221
    222222        // take lock protecting free lists
    223         spinlock_lock( &ppm->free_lock );
     223        uint32_t       irq_state;
     224        spinlock_lock_busy( &ppm->free_lock, &irq_state );
    224225
    225226        // find a free block equal or larger to requested size
     
    237238        {
    238239                // release lock protecting free lists
    239                 spinlock_unlock( &ppm->free_lock );
     240                spinlock_unlock_busy( &ppm->free_lock, irq_state );
    240241
    241242#if DEBUG_PPM_ALLOC_PAGES
     
    273274
    274275        // release lock protecting free lists
    275         spinlock_unlock( &ppm->free_lock );
     276        spinlock_unlock_busy( &ppm->free_lock, irq_state );
    276277
    277278#if DEBUG_PPM_ALLOC_PAGES
Note: See TracChangeset for help on using the changeset viewer.