guo ecf2d82159
sync branch rt-smart. (#6641)
* 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>
2022-12-03 12:07:44 +08:00

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__*/