summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-11-01 15:20:27 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-11-01 15:20:27 +0100
commit84e19ba0671b6d2a1740f14bc033ea9bcdc188e1 (patch)
tree6f0ccf5a962a16302bdf893b6665649a5187077e
parentce07e92f0592ebd0af0ad8c5828dd8f0a7b67da4 (diff)
libfshelp: do not define extern inlines when not requested
* libfshelp/fshelp.h (fshelp_rlock_init, fshelp_rlock_po_init) [!__USE_EXTERN_INLINES && !DISKFS_DEFINE_EXTERN_INLINE]: Do not define.
-rw-r--r--libfshelp/fshelp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h
index b2c5eb5d1..3961a701e 100644
--- a/libfshelp/fshelp.h
+++ b/libfshelp/fshelp.h
@@ -254,6 +254,8 @@ struct rlock_box
struct rlock_list *locks; /* List of locks on the file. */
};
+#if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE)
+
/* Initialize the rlock_box BOX. */
FSHELP_EXTERN_INLINE
error_t fshelp_rlock_init (struct rlock_box *box)
@@ -262,6 +264,8 @@ error_t fshelp_rlock_init (struct rlock_box *box)
return 0;
}
+#endif /* Use extern inlines. */
+
/* Unique to a peropen. */
struct rlock_peropen
{
@@ -272,6 +276,8 @@ struct rlock_peropen
struct rlock_list **locks;
};
+#if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE)
+
FSHELP_EXTERN_INLINE
error_t fshelp_rlock_po_init (struct rlock_peropen *po)
{
@@ -283,6 +289,8 @@ error_t fshelp_rlock_po_init (struct rlock_peropen *po)
return 0;
}
+#endif /* Use extern inlines. */
+
/* Release all of the locks held by a given peropen. */
error_t fshelp_rlock_drop_peropen (struct rlock_peropen *po);