[Tarantool-patches] [PATCH 1/2] trigger: add trigger_is_set() method

Serge Petrenko sergepetrenko at tarantool.org
Sat Apr 11 15:33:44 MSK 2020


---
 src/lib/core/trigger.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/core/trigger.h b/src/lib/core/trigger.h
index 7b500dd92..ae477ad70 100644
--- a/src/lib/core/trigger.h
+++ b/src/lib/core/trigger.h
@@ -95,6 +95,12 @@ trigger_add_unique(struct rlist *list, struct trigger *trigger)
 	trigger_add(list, trigger);
 }
 
+static inline int
+trigger_is_set(struct trigger *trigger)
+{
+	return !rlist_empty(&trigger->link);
+}
+
 static inline void
 trigger_clear(struct trigger *trigger)
 {
-- 
2.21.1 (Apple Git-122.3)



More information about the Tarantool-patches mailing list