MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dfs_lock

Function dfs_lock

components/dfs/dfs_v1/src/dfs.c:115–128  ·  view source on GitHub ↗

* @brief this function will lock device file system. * this lock (fslock) is used for protecting filesystem_operation_table and filesystem_table. * * @note please don't invoke it on ISR. */

Source from the content-addressed store, hash-verified

113 * @note please don't invoke it on ISR.
114 */
115void dfs_lock(void)
116{
117 rt_err_t result = -RT_EBUSY;
118
119 while (result == -RT_EBUSY)
120 {
121 result = rt_mutex_take(&fslock, RT_WAITING_FOREVER);
122 }
123
124 if (result != RT_EOK)
125 {
126 RT_ASSERT(0);
127 }
128}
129
130/**
131 * @brief this function will lock file descriptors.

Callers 12

chdirFunction · 0.70
setcwdFunction · 0.70
getcwdFunction · 0.70
fd_is_openFunction · 0.70
list_fdFunction · 0.70
dfs_registerFunction · 0.70
dfs_filesystem_lookupFunction · 0.70
dfs_mountFunction · 0.70
dfs_unmountFunction · 0.70
dfs_mkfsFunction · 0.70
dfs_unmount_deviceFunction · 0.70

Calls 1

rt_mutex_takeFunction · 0.85

Tested by

no test coverage detected