ecf2d82159
* Synchronize the code of the rt mart branch to the master branch. * TTY device * Add lwP code from rt-smart * Add vnode in DFS, but DFS will be re-write for rt-smart * There are three libcpu for rt-smart: * arm/cortex-a, arm/aarch64 * riscv64 Co-authored-by: Rbb666 <zhangbingru@rt-thread.com> Co-authored-by: zhkag <zhkag@foxmail.com>
41 lines
751 B
C
41 lines
751 B
C
/*
|
|
* Copyright (c) 2006-2019, RT-Thread Development Team
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Change Logs:
|
|
* Date Author Notes
|
|
* 2019-11-01 Jesven The first version
|
|
*/
|
|
|
|
#ifndef __PAGE_H__
|
|
#define __PAGE_H__
|
|
|
|
#ifdef RT_USING_USERSPACE
|
|
|
|
typedef struct tag_region
|
|
{
|
|
size_t start;
|
|
size_t end;
|
|
} rt_region_t;
|
|
|
|
void rt_page_init(rt_region_t reg);
|
|
|
|
void *rt_pages_alloc(uint32_t size_bits);
|
|
|
|
void rt_page_ref_inc(void *addr, uint32_t size_bits);
|
|
|
|
int rt_page_ref_get(void *addr, uint32_t size_bits);
|
|
|
|
int rt_pages_free(void *addr, uint32_t size_bits);
|
|
|
|
void rt_pageinfo_dump(void);
|
|
|
|
size_t rt_page_bits(size_t size);
|
|
|
|
void rt_page_get_info(size_t *total_nr, size_t *free_nr);
|
|
|
|
#endif
|
|
|
|
#endif /*__PAGE_H__*/
|