Ignore:
File:
1 edited

Legend:

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

    rc12f891 r566da7f8  
    6161#include <config.h>
    6262#include <str.h>
    63 #include <proc/thread.h> /* THREAD */
    6463
    6564zones_t zones;
     
    7372static size_t mem_avail_req = 0;  /**< Number of frames requested. */
    7473static size_t mem_avail_gen = 0;  /**< Generation counter. */
     74
     75/********************/
     76/* Helper functions */
     77/********************/
     78
     79NO_TRACE static inline size_t frame_index(zone_t *zone, frame_t *frame)
     80{
     81        return (size_t) (frame - zone->frames);
     82}
     83
     84NO_TRACE static inline size_t frame_index_abs(zone_t *zone, frame_t *frame)
     85{
     86        return (size_t) (frame - zone->frames) + zone->base;
     87}
     88
     89NO_TRACE static inline bool frame_index_valid(zone_t *zone, size_t index)
     90{
     91        return (index < zone->count);
     92}
    7593
    7694/** Initialize frame structure.
Note: See TracChangeset for help on using the changeset viewer.