aboutsummaryrefslogtreecommitdiffstats
path: root/lib/util.h
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2025-03-11 22:21:09 +0100
committerBernd Schubert <bernd@bsbernd.com>2025-03-14 12:58:14 +0100
commit1b86fe4c4de96daa4e766425193595f1c6b88a73 (patch)
tree1af3b7d46056532b928703bac44ea3810bbe3e61 /lib/util.h
parent065272a23392011ea1728c4f2d20e63cf6579e7d (diff)
downloadlibfuse-1b86fe4c4de96daa4e766425193595f1c6b88a73.tar.gz
fuse_lowlevel: Simplify se->buf_reallocable
se->buf_reallocable is true when reading /dev/fuse is handled from internal functions - we can set the variable in fuse_session_receive_buf_internal(). With that we also don't need to have it an _Atomic variable anymore. In _fuse_session_receive_buf() we can use "bool internal" to check if the buffer can be re-allocated. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Diffstat (limited to 'lib/util.h')
-rw-r--r--lib/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/util.h b/lib/util.h
index 74ce748..a5c5463 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -1,3 +1,6 @@
#define ROUND_UP(val, round_to) (((val) + (round_to - 1)) & ~(round_to - 1))
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+
int libfuse_strtol(const char *str, long *res);