WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
osal_fileops.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2021-2022. All rights reserved.
3 * Description: OS Abstract Layer.
4 */
5
9#ifndef __OSAL_FILEOPS_H__
10#define __OSAL_FILEOPS_H__
11
12#ifdef __cplusplus
13#if __cplusplus
14extern "C" {
15#endif
16#endif
17
18#define OSAL_O_RDONLY 00000000
19#define OSAL_O_WRONLY 00000001
20#define OSAL_O_RDWR 00000002
21#define OSAL_O_ACCMODE 00000003
22
23#define OSAL_O_CREAT 00000100
24#define OSAL_O_EXCL 00000200
25#define OSAL_O_TRUNC 00001000
26#define OSAL_O_APPEND 00002000
27#define OSAL_O_CLOEXEC 02000000
28
29#define OSAL_SEEK_SET 0
30#define OSAL_SEEK_CUR 1
31#define OSAL_SEEK_END 2
32
44void *osal_klib_fopen(const char *file, int flags, int mode);
45
53void osal_klib_fclose(void *filp);
54
66int osal_klib_fwrite(const char *buf, unsigned long size, void *filp);
67
79int osal_klib_fread(char *buf, unsigned long size, void *filp);
80
89void osal_klib_fsync(void *filp);
90
100int osal_klib_fseek(long long offset, int whence, void *filp);
101
113int osal_klib_unlink(const char *path);
114
125int osal_klib_ftruncate(void *filp, unsigned long len);
126
127#ifdef __cplusplus
128#if __cplusplus
129}
130#endif
131#endif
132#endif /* __OSAL_FILEOPS_H__ */
int osal_klib_fwrite(const char *buf, unsigned long size, void *filp)
kernel write function.
Definition osal_fileops.c:52
void * osal_klib_fopen(const char *file, int flags, int mode)
open file and return file pointer.
Definition osal_fileops.c:20
int osal_klib_unlink(const char *path)
Removes a file or directory.
int osal_klib_fseek(long long offset, int whence, void *filp)
Kernel file seek function.
Definition osal_fileops.c:70
int osal_klib_ftruncate(void *filp, unsigned long len)
Truncates the size of the file to the specified size.
void osal_klib_fsync(void *filp)
Perform a fsync or fdatasync on a file
Definition osal_fileops.c:86
int osal_klib_fread(char *buf, unsigned long size, void *filp)
Kernel read function.
Definition osal_fileops.c:61
void osal_klib_fclose(void *filp)
close file.
Definition osal_fileops.c:42