diff options
Diffstat (limited to 'libfshelp/fshelp.h')
-rw-r--r-- | libfshelp/fshelp.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h index 4f0c693e..91bbfe50 100644 --- a/libfshelp/fshelp.h +++ b/libfshelp/fshelp.h @@ -298,6 +298,21 @@ error_t fshelp_rlock_po_init (struct rlock_peropen *po) /* Release all of the locks held by a given peropen. */ error_t fshelp_rlock_drop_peropen (struct rlock_peropen *po); +/* Drop the peropen identifier */ +error_t fshelp_rlock_po_fini (struct rlock_peropen *po); + +#if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE) + +FSHELP_EXTERN_INLINE +error_t fshelp_rlock_po_fini (struct rlock_peropen *po) +{ + free (po->locks); + po->locks = NULL; + return 0; +} + +#endif /* Use extern inlines. */ + /* Call when a user makes a request to tweak a lock as via fcntl. There should be one rlock box per object. BOX is the rlock box associated with the object. MUT is a mutex which should be held whenever this |