Changeset eb522e8 in mainline for kernel/generic/include/mm/as.h
- Timestamp:
- 2011-06-01T08:43:42Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d6c1f1
- Parents:
- 9e2e715 (diff), e51a514 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/mm/as.h
r9e2e715 reb522e8 115 115 116 116 /** 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. 119 120 */ 120 121 size_t cpu_refcount; 121 122 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 * 126 128 */ 127 129 asid_t asid; 128 130 129 /** Number of references (i.e tasks that reference this as). */131 /** Number of references (i.e. tasks that reference this as). */ 130 132 atomic_t refcount; 131 133 … … 199 201 typedef struct { 200 202 mutex_t lock; 203 201 204 /** Containing address space. */ 202 205 as_t *as; 203 206 204 /** 205 * Flags related to the memory represented by the address space area. 206 */ 207 /** Memory flags. */ 207 208 unsigned int flags; 208 209 209 /** A ttributes related to the address space area itself. */210 /** Address space area attributes. */ 210 211 unsigned int attributes; 211 /** Size of this area in multiples of PAGE_SIZE. */ 212 213 /** Number of pages in the area. */ 212 214 size_t pages; 215 216 /** Number of resident pages in the area. */ 217 size_t resident; 218 213 219 /** Base address of this area. */ 214 220 uintptr_t base; 221 215 222 /** Map of used space. */ 216 223 btree_t used_space; 217 224 218 225 /** 219 * If the address space area has been shared, this pointer will220 * referencethe share info structure.226 * If the address space area is shared. this is 227 * a reference to the share info structure. 221 228 */ 222 229 share_info_t *sh_info; … … 231 238 /** Address space area backend structure. */ 232 239 typedef struct mem_backend { 240 bool (* create)(as_area_t *); 241 bool (* resize)(as_area_t *, size_t); 242 void (* share)(as_area_t *); 243 void (* destroy)(as_area_t *); 244 233 245 int (* page_fault)(as_area_t *, uintptr_t, pf_access_t); 234 246 void (* frame_free)(as_area_t *, uintptr_t, uintptr_t); 235 void (* share)(as_area_t *);236 247 } mem_backend_t; 237 248 … … 261 272 extern bool as_area_check_access(as_area_t *, pf_access_t); 262 273 extern size_t as_area_get_size(uintptr_t); 263 extern int used_space_insert(as_area_t *, uintptr_t, size_t); 264 extern int used_space_remove(as_area_t *, uintptr_t, size_t); 265 274 extern bool used_space_insert(as_area_t *, uintptr_t, size_t); 275 extern bool used_space_remove(as_area_t *, uintptr_t, size_t); 266 276 267 277 /* Interface to be implemented by architectures. */ … … 303 313 304 314 /* Address space area related syscalls. */ 305 extern unative_t sys_as_area_create(uintptr_t, size_t, unsigned int); 306 extern unative_t sys_as_area_resize(uintptr_t, size_t, unsigned int); 307 extern unative_t sys_as_area_change_flags(uintptr_t, unsigned int); 308 extern unative_t sys_as_area_destroy(uintptr_t); 315 extern sysarg_t sys_as_area_create(uintptr_t, size_t, unsigned int); 316 extern sysarg_t sys_as_area_resize(uintptr_t, size_t, unsigned int); 317 extern sysarg_t sys_as_area_change_flags(uintptr_t, unsigned int); 318 extern sysarg_t sys_as_area_destroy(uintptr_t); 319 extern sysarg_t sys_as_get_unmapped_area(uintptr_t, size_t); 309 320 310 321 /* Introspection functions. */
Note:
See TracChangeset
for help on using the changeset viewer.