Changeset 7aaed09 in mainline for uspace/lib/c/generic/as.c


Ignore:
Timestamp:
2011-12-18T14:02:30Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c868e2d
Parents:
3b71e84d (diff), 1761268 (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/as.c

    r3b71e84d r7aaed09  
    117117/** Find mapping to physical address.
    118118 *
    119  * @param address Virtual address in question (virtual).
    120  * @param[out] frame Frame address (physical).
    121  * @return Error code.
    122  * @retval EOK No error, @p frame holds the translation.
    123  * @retval ENOENT Mapping not found.
     119 * @param      virt Virtual address to find mapping for.
     120 * @param[out] phys Physical adress.
     121 *
     122 * @return EOK on no error.
     123 * @retval ENOENT if no mapping was found.
     124 *
    124125 */
    125 int as_get_physical_mapping(const void *address, uintptr_t *frame)
     126int as_get_physical_mapping(const void *virt, uintptr_t *phys)
    126127{
    127         uintptr_t tmp_frame;
    128         uintptr_t virt = (uintptr_t) address;
    129        
    130         int rc = (int) __SYSCALL2(SYS_PAGE_FIND_MAPPING,
    131             (sysarg_t) virt, (sysarg_t) &tmp_frame);
    132         if (rc != EOK) {
    133                 return rc;
    134         }
    135        
    136         if (frame != NULL) {
    137                 *frame = tmp_frame;
    138         }
    139        
    140         return EOK;
     128        return (int) __SYSCALL2(SYS_PAGE_FIND_MAPPING, (sysarg_t) virt,
     129            (sysarg_t) phys);
    141130}
    142131
Note: See TracChangeset for help on using the changeset viewer.