RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
dfs.c 文件参考
#include <dfs.h>
#include <dfs_fs.h>
#include <dfs_dentry.h>
#include <dfs_file.h>
#include <dfs_mnt.h>
#include <rtservice.h>
#include "dfs_private.h"
#include <rtdbg.h>
#include <finsh.h>
+ dfs.c 的引用(Include)关系图:

浏览该文件的源代码.

宏定义

#define DBG_TAG   "DFS"
 
#define DBG_LVL   DBG_INFO
 

函数

rt_err_t dfs_lock (void)
 
void dfs_unlock (void)
 
rt_err_t dfs_file_lock (void)
 
void dfs_file_unlock (void)
 
int dfs_init (void)
 
 INIT_PREV_EXPORT (dfs_init)
 
int fdt_fd_new (struct dfs_fdtable *fdt)
 
void fdt_fd_release (struct dfs_fdtable *fdt, int fd)
 
struct dfs_filefdt_get_file (struct dfs_fdtable *fdt, int fd)
 
int fdt_fd_associate_file (struct dfs_fdtable *fdt, int fd, struct dfs_file *file)
 
int fd_new (void)
 
void fd_release (int fd)
 
struct dfs_filefd_get (int fd)
 
struct dfs_fdtabledfs_fdtable_get (void)
 
struct dfs_fdtabledfs_fdtable_get_global (void)
 
int dfs_fdtable_dup (struct dfs_fdtable *fdt_dst, struct dfs_fdtable *fdt_src, int fd_src)
 
int dfs_fdtable_drop_fd (struct dfs_fdtable *fdt, int fd)
 
int dfs_dup (int oldfd, int startfd)
 
int dfs_dup_to (int oldfd, struct dfs_fdtable *fdtab)
 
int dfs_dup_from (int oldfd, struct dfs_fdtable *fdtab)
 
int sys_dup (int oldfd)
 
rt_err_t sys_dup2 (int oldfd, int newfd)
 
const char * dfs_subdir (const char *directory, const char *filename)
 
 RTM_EXPORT (dfs_subdir)
 
char * dfs_normalize_path (const char *directory, const char *filename)
 
 RTM_EXPORT (dfs_normalize_path)
 
int list_fd (void)
 
 MSH_CMD_EXPORT (list_fd, list file descriptor)
 
int dfs_fd_dump (int argc, char **argv)
 
 MSH_CMD_EXPORT_ALIAS (dfs_fd_dump, fd_dump, fd dump)
 

宏定义说明

◆ DBG_TAG

#define DBG_TAG   "DFS"

在文件 dfs.c23 行定义.

◆ DBG_LVL

#define DBG_LVL   DBG_INFO

在文件 dfs.c24 行定义.

函数说明

◆ dfs_lock()

rt_err_t dfs_lock ( void )

this function will lock device file system.

注解
please don't invoke it on ISR.

在文件 dfs.c120 行定义.

121{
122 rt_err_t result = -RT_EBUSY;
123
124 while (result == -RT_EBUSY)
125 {
126 result = rt_mutex_take(&fslock, RT_WAITING_FOREVER);
127 }
128
129 return result;
130}
#define RT_WAITING_FOREVER
rt_err_t rt_mutex_take(rt_mutex_t mutex, rt_int32_t time)
定义 ipc.c:1537
rt_base_t rt_err_t

引用了 rt_mutex_take() , 以及 RT_WAITING_FOREVER.

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ dfs_unlock()

void dfs_unlock ( void )

this function will lock device file system.

注解
please don't invoke it on ISR.

在文件 dfs.c137 行定义.

138{
139 rt_mutex_release(&fslock);
140}
rt_err_t rt_mutex_release(rt_mutex_t mutex)
This function will release a mutex. If there is thread suspended on the mutex, the thread will be res...
定义 ipc.c:1589

引用了 rt_mutex_release().

+ 函数调用图:
+ 这是这个函数的调用关系图: