Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko <sergepetrenko@tarantool.org>
To: sergeyb@tarantool.org, gorcunov@gmail.com
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH 1/2] trigger: add trigger_is_set() method
Date: Sat, 11 Apr 2020 15:33:44 +0300	[thread overview]
Message-ID: <b6b0188089089533458d2f4bfd6d13487c466c36.1586606685.git.sergepetrenko@tarantool.org> (raw)
In-Reply-To: <cover.1586606685.git.sergepetrenko@tarantool.org>

---
 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)

  reply	other threads:[~2020-04-11 12:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11 12:33 [Tarantool-patches] [PATCH 0/2] fix replication/anon test segfaut Serge Petrenko
2020-04-11 12:33 ` Serge Petrenko [this message]
2020-04-11 16:33   ` [Tarantool-patches] [PATCH 1/2] trigger: add trigger_is_set() method Cyrill Gorcunov
2020-04-13  9:53     ` Serge Petrenko
2020-04-13 10:00       ` Cyrill Gorcunov
2020-04-11 12:33 ` [Tarantool-patches] [PATCH 2/2] relay: fix segfault on replica transition from anonymous Serge Petrenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6b0188089089533458d2f4bfd6d13487c466c36.1586606685.git.sergepetrenko@tarantool.org \
    --to=sergepetrenko@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=sergeyb@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/2] trigger: add trigger_is_set() method' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox