Changeset faba839 in mainline for uspace/lib
- Timestamp:
- 2012-06-13T13:16:19Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2902e1bb
- Parents:
- 32d19f7
- Location:
- uspace/lib
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/as.c
r32d19f7 rfaba839 46 46 * 47 47 * @param base Starting virtual address of the area. 48 * If set to (void *) -1, the kernel finds49 * a mappable area.48 * If set to AS_AREA_ANY ((void *) -1), 49 * the kernel finds a mappable area. 50 50 * @param size Size of the area. 51 51 * @param flags Flags describing type of the area. 52 52 * 53 53 * @return Starting virtual address of the created area on success. 54 * @return (void *) -1otherwise.54 * @return AS_MAP_FAILED ((void *) -1) otherwise. 55 55 * 56 56 */ -
uspace/lib/c/generic/elf/elf_load.c
r32d19f7 rfaba839 366 366 a = as_area_create((uint8_t *) base + bias, mem_sz, 367 367 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 368 if (a == (void *) -1) {368 if (a == AS_MAP_FAILED) { 369 369 DPRINTF("memory mapping failed (0x%x, %d)\n", 370 370 base + bias, mem_sz); -
uspace/lib/c/generic/malloc.c
r32d19f7 rfaba839 285 285 /* Align the heap area size on page boundary */ 286 286 size_t asize = ALIGN_UP(size, PAGE_SIZE); 287 void *astart = as_area_create( (void *) -1, asize,287 void *astart = as_area_create(AS_AREA_ANY, asize, 288 288 AS_AREA_WRITE | AS_AREA_READ); 289 if (astart == (void *) -1)289 if (astart == AS_MAP_FAILED) 290 290 return false; 291 291 -
uspace/lib/c/generic/mman.c
r32d19f7 rfaba839 42 42 { 43 43 if (!start) 44 start = (void *) -1;44 start = AS_AREA_ANY; 45 45 46 46 // if (!((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE))) -
uspace/lib/c/include/as.h
r32d19f7 rfaba839 41 41 #include <libarch/config.h> 42 42 43 #define AS_AREA_ANY ((void *) -1) 44 #define AS_MAP_FAILED ((void *) -1) 45 43 46 static inline size_t SIZE2PAGES(size_t size) 44 47 { -
uspace/lib/c/include/sys/mman.h
r32d19f7 rfaba839 39 39 #include <sys/types.h> 40 40 41 #define MAP_FAILED ((void *) -1)41 #define MAP_FAILED AS_MAP_FAILED 42 42 43 43 #define MAP_SHARED (1 << 0) -
uspace/lib/fb/imgmap.c
r32d19f7 rfaba839 420 420 421 421 if ((flags & IMGMAP_FLAG_SHARED) == IMGMAP_FLAG_SHARED) { 422 imgmap = (imgmap_t *) as_area_create( (void *) -1, size,422 imgmap = (imgmap_t *) as_area_create(AS_AREA_ANY, size, 423 423 AS_AREA_READ | AS_AREA_WRITE); 424 if (imgmap == (void *) -1)424 if (imgmap == AS_MAP_FAILED) 425 425 return NULL; 426 426 } else { -
uspace/lib/fb/screenbuffer.c
r32d19f7 rfaba839 79 79 80 80 if ((flags & SCREENBUFFER_FLAG_SHARED) == SCREENBUFFER_FLAG_SHARED) { 81 scrbuf = (screenbuffer_t *) as_area_create( (void *) -1, size,81 scrbuf = (screenbuffer_t *) as_area_create(AS_AREA_ANY, size, 82 82 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 83 if (scrbuf == (void *) -1)83 if (scrbuf == AS_MAP_FAILED) 84 84 return NULL; 85 85 } else { -
uspace/lib/fs/libfs.c
r32d19f7 rfaba839 339 339 */ 340 340 rc = async_share_in_start_0_0(exch, PLB_SIZE, (void *) ®.plb_ro); 341 if (reg.plb_ro == (void *) -1) {341 if (reg.plb_ro == AS_MAP_FAILED) { 342 342 async_exchange_end(exch); 343 343 async_forget(req);
Note:
See TracChangeset
for help on using the changeset viewer.