Changeset 82d56184 in mainline for kernel/generic/src/mm/frame.c


Ignore:
Timestamp:
2011-06-01T21:05:19Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5cac9cd
Parents:
682cfceb (diff), 5d1b3aa (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/frame.c

    r682cfceb r82d56184  
    182182 *
    183183 */
    184 #ifdef CONFIG_DEBUG
    185 NO_TRACE static size_t total_frames_free(void)
     184NO_TRACE static size_t frame_total_free_get_internal(void)
    186185{
    187186        size_t total = 0;
    188187        size_t i;
     188
    189189        for (i = 0; i < zones.count; i++)
    190190                total += zones.info[i].free_count;
     
    192192        return total;
    193193}
    194 #endif /* CONFIG_DEBUG */
     194
     195NO_TRACE size_t frame_total_free_get(void)
     196{
     197        size_t total;
     198
     199        irq_spinlock_lock(&zones.lock, true);
     200        total = frame_total_free_get_internal();
     201        irq_spinlock_unlock(&zones.lock, true);
     202
     203        return total;
     204}
     205
    195206
    196207/** Find a zone with a given frames.
     
    840851                        buddy_system_free(zone->buddy_system, &zone->frames[i].buddy_link);
    841852                }
    842 
    843                 /* "Unreserve" new frames. */
    844                 reserve_free(count);
    845853        } else
    846854                zone->frames = NULL;
     
    10511059               
    10521060#ifdef CONFIG_DEBUG
    1053                 size_t avail = total_frames_free();
     1061                size_t avail = frame_total_free_get_internal();
    10541062#endif
    10551063               
Note: See TracChangeset for help on using the changeset viewer.