Ignore:
File:
1 edited

Legend:

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

    r9d58539 r83b6ba9f  
    6161#define USER_ADDRESS_SPACE_END      USER_ADDRESS_SPACE_END_ARCH
    6262
    63 #ifdef USTACK_ADDRESS_ARCH
    64         #define USTACK_ADDRESS  USTACK_ADDRESS_ARCH
    65 #else
    66         #define USTACK_ADDRESS  (USER_ADDRESS_SPACE_END - (STACK_SIZE - 1))
    67 #endif
    68 
    6963/** Kernel address space. */
    7064#define FLAG_AS_KERNEL  (1 << 0)
     
    7468#define AS_AREA_ATTR_PARTIAL  1  /**< Not fully initialized area. */
    7569
     70/** The page fault was resolved by as_page_fault(). */
     71#define AS_PF_OK     0
     72
     73/** The page fault was caused by memcpy_from_uspace() or memcpy_to_uspace(). */
     74#define AS_PF_DEFER  1
     75
    7676/** The page fault was not resolved by as_page_fault(). */
    77 #define AS_PF_FAULT  0
    78 
    79 /** The page fault was resolved by as_page_fault(). */
    80 #define AS_PF_OK  1
    81 
    82 /** The page fault was caused by memcpy_from_uspace() or memcpy_to_uspace(). */
    83 #define AS_PF_DEFER  2
     77#define AS_PF_FAULT  2
     78
     79/** The page fault was not resolved by as_page_fault(). Non-verbose version. */
     80#define AS_PF_SILENT 3
    8481
    8582/** Address space structure.
     
    143140        /** This structure can be deallocated if refcount drops to 0. */
    144141        size_t refcount;
    145        
     142        /** True if the area has been ever shared. */
     143        bool shared;
     144
    146145        /**
    147146         * B+tree containing complete map of anonymous pages of the shared area.
    148147         */
    149148        btree_t pagemap;
     149
     150        /** Address space area backend. */
     151        struct mem_backend *backend;
     152        /** Address space area shared data. */
     153        void *backend_shared_data;
    150154} share_info_t;
    151155
     
    172176                uintptr_t base;
    173177                size_t frames;
     178                bool anonymous;
    174179        };
    175180} mem_backend_data_t;
     
    224229        void (* destroy)(as_area_t *);
    225230
     231        bool (* is_resizable)(as_area_t *);
     232        bool (* is_shareable)(as_area_t *);
     233
    226234        int (* page_fault)(as_area_t *, uintptr_t, pf_access_t);
    227235        void (* frame_free)(as_area_t *, uintptr_t, uintptr_t);
     236
     237        bool (* create_shared_data)(as_area_t *);
     238        void (* destroy_shared_data)(void *);
    228239} mem_backend_t;
    229240
Note: See TracChangeset for help on using the changeset viewer.