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

Function dfs_mnt_ref

components/dfs/dfs_v2/src/dfs_mnt.c:315–324  ·  view source on GitHub ↗

* @brief Increase the reference count of a dfs_mnt structure instance. * * This function increments the reference count of the specified dfs_mnt structure. * The reference count is used to track how many parts of the system are currently * using this mount point. * * @param[in,out] mnt Pointer to the dfs_mnt structure whose reference count is to be increased. * If the poi

Source from the content-addressed store, hash-verified

313 * If the input pointer is NULL, it simply returns NULL.
314 */
315struct dfs_mnt* dfs_mnt_ref(struct dfs_mnt* mnt)
316{
317 if (mnt)
318 {
319 rt_atomic_add(&(mnt->ref_count), 1);
320 DLOG(note, "mnt", "mnt(%s),ref_count=%d", mnt->fs_ops->name, rt_atomic_load(&(mnt->ref_count)));
321 }
322
323 return mnt;
324}
325
326/**
327 * @brief Decrease the reference count of a dfs_mnt structure instance and free it if necessary.

Callers 2

dfs_mnt_insertFunction · 0.85
_dentry_createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected