Files
TencentOS-tiny/components/fs/vfs/include/tos_vfs.h
daishengdong 0a2d5a4e90 support elfloader for shared object and relocatable object
1. elfloader for shared object
example: TencentOS-tiny\examples\elfloader_shared_object
keil: TencentOS-tiny\board\TencentOS_tiny_EVB_MX_Plus\KEIL\elfloader_shared_object

2. elfloader for relocatable object:
example: TencentOS-tiny\examples\elfloader_relocatable_object
keil: TencentOS-tiny\board\TencentOS_tiny_EVB_MX_Plus\KEIL\elfloader_relocatable_object

3. TODO:
- add icache/dcache flush when module is loaded
- support more relocation type in elfloader_arch_relocate
2020-06-09 19:30:38 +08:00

74 lines
2.3 KiB
C

/*----------------------------------------------------------------------------
* Tencent is pleased to support the open source community by making TencentOS
* available.
*
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* If you have downloaded a copy of the TencentOS binary from Tencent, please
* note that the TencentOS binary is licensed under the BSD 3-Clause License.
*
* If you have downloaded a copy of the TencentOS source code from Tencent,
* please note that TencentOS source code is licensed under the BSD 3-Clause
* License, except for the third-party components listed below which are
* subject to different license terms. Your integration of TencentOS into your
* own projects may require compliance with the BSD 3-Clause License, as well
* as the other licenses applicable to the third-party components included
* within TencentOS.
*---------------------------------------------------------------------------*/
#ifndef _TOS_VFS_H_
#define _TOS_VFS_H_
#include "tos_k.h"
#include "tos_vfs_err.h"
#include "tos_vfs_types.h"
#include "tos_vfs_file.h"
#include "tos_vfs_device.h"
#include "tos_vfs_fs.h"
#include "tos_vfs_inode.h"
#define TOS_CFG_VFS_PATH_MAX 26
__API__ int tos_vfs_open(const char *pathname, vfs_oflag_t flags);
__API__ int tos_vfs_close(int fd);
__API__ ssize_t tos_vfs_read(int fd, void *buf, size_t count);
__API__ ssize_t tos_vfs_write(int fd, const void *buf, size_t count);
__API__ vfs_off_t tos_vfs_lseek(int fd, vfs_off_t offset, vfs_whence_t whence);
__API__ int tos_vfs_ioctl(int fd, unsigned long request, ...);
__API__ int tos_vfs_sync(int fd);
__API__ int tos_vfs_dup(int oldfd);
__API__ int tos_vfs_fstat(int fd, vfs_fstat_t *buf);
__API__ int tos_vfs_ftruncate(int fd, vfs_off_t length);
__API__ VFS_DIR *tos_vfs_opendir(const char *name);
__API__ int tos_vfs_closedir(VFS_DIR *dirp);
__API__ vfs_dirent_t *tos_vfs_readdir(VFS_DIR *dirp);
__API__ int tos_vfs_rewinddir(VFS_DIR *dirp);
__API__ int tos_vfs_statfs(const char *path, vfs_fsstat_t *buf);
__API__ int tos_vfs_unlink(const char *pathname);
__API__ int tos_vfs_mkdir(const char *pathname);
__API__ int tos_vfs_rmdir(const char *pathname);
__API__ int tos_vfs_rename(const char *oldpath, const char *newpath);
__API__ int tos_vfs_stat(const char *pathname, vfs_fstat_t *buf);
#endif /* _TOS_VFS_H_ */