Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/mm/as.h

    r03523dc rfc47885  
    115115       
    116116        /**
    117          * Number of processors on wich is this address space active.
    118          * Protected by asidlock.
     117         * Number of processors on which this
     118         * address space is active. Protected by
     119         * asidlock.
    119120         */
    120121        size_t cpu_refcount;
    121122       
    122         /**
    123          * Address space identifier.
    124          * Constant on architectures that do not support ASIDs.
    125          * Protected by asidlock.
     123        /** Address space identifier.
     124         *
     125         * Constant on architectures that do not
     126         * support ASIDs. Protected by asidlock.
     127         *
    126128         */
    127129        asid_t asid;
    128130       
    129         /** Number of references (i.e tasks that reference this as). */
     131        /** Number of references (i.e. tasks that reference this as). */
    130132        atomic_t refcount;
    131133       
     
    199201typedef struct {
    200202        mutex_t lock;
     203       
    201204        /** Containing address space. */
    202205        as_t *as;
    203206       
    204         /**
    205          * Flags related to the memory represented by the address space area.
    206          */
     207        /** Memory flags. */
    207208        unsigned int flags;
    208209       
    209         /** Attributes related to the address space area itself. */
     210        /** Address space area attributes. */
    210211        unsigned int attributes;
    211         /** Size of this area in multiples of PAGE_SIZE. */
     212       
     213        /** Number of pages in the area. */
    212214        size_t pages;
     215       
     216        /** Number of resident pages in the area. */
     217        size_t resident;
     218       
    213219        /** Base address of this area. */
    214220        uintptr_t base;
     221       
    215222        /** Map of used space. */
    216223        btree_t used_space;
    217224       
    218225        /**
    219          * If the address space area has been shared, this pointer will
    220          * reference the share info structure.
     226         * If the address space area is shared. this is
     227         * a reference to the share info structure.
    221228         */
    222229        share_info_t *sh_info;
     
    231238/** Address space area backend structure. */
    232239typedef struct mem_backend {
    233         bool (* create)(as_area_t *);
    234         bool (* resize)(as_area_t *, size_t);
    235         void (* share)(as_area_t *);
    236         void (* destroy)(as_area_t *);
    237 
    238240        int (* page_fault)(as_area_t *, uintptr_t, pf_access_t);
    239241        void (* frame_free)(as_area_t *, uintptr_t, uintptr_t);
     242        void (* share)(as_area_t *);
    240243} mem_backend_t;
    241244
     
    265268extern bool as_area_check_access(as_area_t *, pf_access_t);
    266269extern size_t as_area_get_size(uintptr_t);
    267 extern int used_space_insert(as_area_t *, uintptr_t, size_t);
    268 extern int used_space_remove(as_area_t *, uintptr_t, size_t);
    269 
     270extern bool used_space_insert(as_area_t *, uintptr_t, size_t);
     271extern bool used_space_remove(as_area_t *, uintptr_t, size_t);
    270272
    271273/* Interface to be implemented by architectures. */
Note: See TracChangeset for help on using the changeset viewer.