[posix][mmap] create the mman folder
This commit is contained in:
parent
ce8085befa
commit
15435b6850
|
@ -7,8 +7,8 @@
|
|||
* Date Author Notes
|
||||
* 2020-09-01 Meco Man First Version
|
||||
*/
|
||||
#ifndef _SYS_IOCTL_H
|
||||
#define _SYS_IOCTL_H
|
||||
#ifndef __SYS_IOCTL_H__
|
||||
#define __SYS_IOCTL_H__
|
||||
|
||||
#include <rtconfig.h>
|
||||
#include <dfs_posix.h>
|
||||
|
|
|
@ -30,7 +30,7 @@ if RT_USING_POSIX_FS
|
|||
bool "Enable Asynchronous I/O <aio.h>"
|
||||
default n
|
||||
|
||||
config RT_USING_POSIX_MMAP
|
||||
config RT_USING_POSIX_MMAN
|
||||
bool "Enable Memory-Mapped I/O <sys/mman.h>"
|
||||
default n
|
||||
endif
|
||||
|
|
|
@ -18,10 +18,6 @@ if GetDepend('RT_USING_POSIX_SELECT'):
|
|||
src += ['select.c']
|
||||
flag = True
|
||||
|
||||
if GetDepend('RT_USING_POSIX_MMAP'):
|
||||
src += ['mmap.c']
|
||||
flag = True
|
||||
|
||||
if flag == True:
|
||||
group = DefineGroup('POSIX', src, depend = [], CPPPATH = CPPPATH)
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# RT-Thread building script for component
|
||||
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = ['mman.c']
|
||||
CPPPATH = [cwd]
|
||||
|
||||
group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX_MMAN'], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
|
@ -14,7 +14,7 @@
|
|||
#include <rtthread.h>
|
||||
#include <dfs_posix.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include "sys/mman.h"
|
||||
|
||||
void *mmap(void *addr, size_t length, int prot, int flags,
|
||||
int fd, off_t offset)
|
|
@ -8,8 +8,8 @@
|
|||
* 2017/11/30 Bernard The first version.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_MMAN_H
|
||||
#define _SYS_MMAN_H
|
||||
#ifndef __SYS_MMAN_H__
|
||||
#define __SYS_MMAN_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
|
@ -12,7 +12,7 @@
|
|||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
#include <dfs_file.h>
|
||||
#include <poll.h>
|
||||
#include "poll.h"
|
||||
|
||||
struct rt_poll_node;
|
||||
|
||||
|
|
Loading…
Reference in New Issue