Changeset e3122b0 in mainline
- Timestamp:
- 2012-07-20T14:33:35Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3795f9c
- Parents:
- 8fccd42
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/utils/malloc32.h
r8fccd42 re3122b0 35 35 #define DRV_UHCI_UTILS_MALLOC32_H 36 36 37 #include <as.h> 37 38 #include <assert.h> 38 #include < unistd.h>39 #include <ddi.h> 39 40 #include <errno.h> 40 41 #include <malloc.h> 41 42 #include <mem.h> 42 #include < as.h>43 #include <unistd.h> 43 44 44 45 #define UHCI_STRCUTURES_ALIGNMENT 16 … … 99 100 static inline void * get_page(void) 100 101 { 101 void *address = as_area_create(AS_AREA_ANY, UHCI_REQUIRED_PAGE_SIZE, 102 AS_AREA_READ | AS_AREA_WRITE); 103 if (address == AS_MAP_FAILED) 104 return NULL; 105 106 return address; 102 void *address, *phys; 103 const int ret = dmamem_map_anonymous(UHCI_REQUIRED_PAGE_SIZE, 104 AS_AREA_READ | AS_AREA_WRITE, 0, &phys, &address); 105 return ret == EOK ? address : NULL; 107 106 } 108 107 109 108 static inline void return_page(void *page) 110 109 { 111 if (page) 112 as_area_destroy(page); 110 dmamem_unmap_anonymous(page); 113 111 } 114 112
Note:
See TracChangeset
for help on using the changeset viewer.