aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/srp.h
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-10-19 13:54:31 +0300
committerCem Keylan <cem@ckyln.com>2020-10-19 13:54:31 +0300
commit317043010879767bc6a3bef6cbec0c5f300d1ce0 (patch)
tree4bb7c8cd59acb28c4c21eea06cb653f7b82d5aeb /sys/sys/srp.h
parent54d853eaccae1f4f2e04ae70d79e34cfef86bf67 (diff)
downloadotools-317043010879767bc6a3bef6cbec0c5f300d1ce0.tar.gz
sys: update to 6.8
Diffstat (limited to 'sys/sys/srp.h')
-rw-r--r--sys/sys/srp.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/sys/srp.h b/sys/sys/srp.h
index a22e940..c2f40ab 100644
--- a/sys/sys/srp.h
+++ b/sys/sys/srp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: srp.h,v 1.14 2019/03/31 14:03:40 mpi Exp $ */
+/* $OpenBSD: srp.h,v 1.15 2020/05/09 10:18:27 jca Exp $ */
/*
* Copyright (c) 2014 Jonathan Matthew <jmatthew@openbsd.org>
@@ -96,11 +96,18 @@ void *srp_enter(struct srp_ref *, struct srp *);
void *srp_follow(struct srp_ref *, struct srp *);
void srp_leave(struct srp_ref *);
#else /* MULTIPROCESSOR */
+
+static inline void *
+srp_enter(struct srp_ref *sr, struct srp *srp)
+{
+ sr->hz = NULL;
+ return srp->ref;
+}
+
#define srp_swap(_srp, _v) srp_swap_locked((_srp), (_v))
#define srp_update(_gc, _srp, _v) srp_update_locked((_gc), (_srp), (_v))
#define srp_finalize(_v, _wchan) ((void)0)
-#define srp_enter(_sr, _srp) ((_srp)->ref)
-#define srp_follow(_sr, _srp) ((_srp)->ref)
+#define srp_follow(_sr, _srp) srp_enter(_sr, _srp)
#define srp_leave(_sr) do { } while (0)
#endif /* MULTIPROCESSOR */