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

Function dfs_file_destroy

components/dfs/dfs_v2/src/dfs.c:275–285  ·  view source on GitHub ↗

* @brief Destroy and free a file descriptor structure * * @param[in] file Pointer to the file descriptor structure to be destroyed */

Source from the content-addressed store, hash-verified

273 * @param[in] file Pointer to the file descriptor structure to be destroyed
274 */
275void dfs_file_destroy(struct dfs_file *file)
276{
277 rt_mutex_detach(&file->pos_lock);
278
279 if (file->mmap_context)
280 {
281 rt_free(file->mmap_context);
282 }
283
284 rt_free(file);
285}
286
287/**
288 * @ingroup group_fs_file_descriptor

Callers 2

on_varea_closeFunction · 0.85
fdt_fd_releaseFunction · 0.85

Calls 2

rt_mutex_detachFunction · 0.85
rt_freeFunction · 0.85

Tested by

no test coverage detected