source: mainline/uspace/lib/c/include/as.h@ cd1e3fc0

Last change on this file since cd1e3fc0 was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago

Replace some license headers with SPDX identifier

Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.

  • Property mode set to 100644
File size: 952 bytes
RevLine 
[5a4c754]1/*
[d7f7a4a]2 * SPDX-FileCopyrightText: 2005 Martin Decky
[5a4c754]3 *
[d7f7a4a]4 * SPDX-License-Identifier: BSD-3-Clause
[5a4c754]5 */
6
[fadd381]7/** @addtogroup libc
[b2951e2]8 * @{
9 */
10/** @file
11 */
12
[4805495]13#ifndef _LIBC_AS_H_
14#define _LIBC_AS_H_
[5a4c754]15
[cf13b17]16#include <types/common.h>
[8d2dd7f2]17#include <stddef.h>
18#include <stdint.h>
[c0699467]19#include <abi/mm/as.h>
[f8ddd17]20#include <libarch/config.h>
21
[ae6f303]22static inline size_t SIZE2PAGES(size_t size)
23{
24 if (size == 0)
25 return 0;
[a35b458]26
[ae6f303]27 return (size_t) ((size - 1) >> PAGE_WIDTH) + 1;
28}
29
30static inline size_t PAGES2SIZE(size_t pages)
31{
32 return (size_t) (pages << PAGE_WIDTH);
33}
34
[ae6021d]35extern void *as_area_create(void *, size_t, unsigned int,
36 as_area_pager_info_t *);
[b7fd2a0]37extern errno_t as_area_resize(void *, size_t, unsigned int);
38extern errno_t as_area_change_flags(void *, unsigned int);
[3b3fcf36]39extern errno_t as_area_get_info(void *, as_area_info_t *);
[b7fd2a0]40extern errno_t as_area_destroy(void *);
[56273bb]41extern void *set_maxheapsize(size_t);
[b7fd2a0]42extern errno_t as_get_physical_mapping(const void *, uintptr_t *);
[5a4c754]43
44#endif
[b2951e2]45
[fadd381]46/** @}
[b2951e2]47 */
Note: See TracBrowser for help on using the repository browser.