From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Subject: [Tarantool-patches] [PATCH v11 1/3] coio: export helpers
Date: Mon, 17 Feb 2020 15:18:16 +0300 [thread overview]
Message-ID: <20200217121818.11375-2-gorcunov@gmail.com> (raw)
In-Reply-To: <20200217121818.11375-1-gorcunov@gmail.com>
There is no reason to hide functions. In particular
we will use these helpers in popen code.
Part-of #4031
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
src/box/applier.cc | 2 +-
src/lib/core/coio.h | 18 +++++++++++++-----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/box/applier.cc b/src/box/applier.cc
index ae3d281a5..ecfe0771b 100644
--- a/src/box/applier.cc
+++ b/src/box/applier.cc
@@ -1009,7 +1009,7 @@ applier_disconnect(struct applier *applier, enum applier_state state)
applier->writer = NULL;
}
- coio_close(loop(), &applier->io);
+ coio_close_io(loop(), &applier->io);
/* Clear all unparsed input. */
ibuf_reinit(&applier->ibuf);
fiber_gc();
diff --git a/src/lib/core/coio.h b/src/lib/core/coio.h
index 6a2337689..c323955d7 100644
--- a/src/lib/core/coio.h
+++ b/src/lib/core/coio.h
@@ -32,9 +32,16 @@
*/
#include "fiber.h"
#include "trivia/util.h"
-#if defined(__cplusplus)
+
#include "evio.h"
+#if defined(__cplusplus)
+extern "C" {
+#endif /* defined(__cplusplus) */
+
+struct sockaddr;
+struct uri;
+
/**
* Co-operative I/O
* Yield the current fiber until IO is ready.
@@ -70,8 +77,12 @@ coio_accept(struct ev_io *coio, struct sockaddr *addr, socklen_t addrlen,
void
coio_create(struct ev_io *coio, int fd);
+/*
+ * Due to name conflict with coio_close in API_EXPORT
+ * we have to use coio_close_io() instead of plain coio_close().
+ */
static inline void
-coio_close(ev_loop *loop, struct ev_io *coio)
+coio_close_io(ev_loop *loop, struct ev_io *coio)
{
return evio_close(loop, coio);
}
@@ -185,9 +196,6 @@ coio_stat_stat_timeout(ev_stat *stat, ev_tstamp delay);
int
coio_waitpid(pid_t pid);
-extern "C" {
-#endif /* defined(__cplusplus) */
-
/** \cond public */
enum {
--
2.20.1
next prev parent reply other threads:[~2020-02-17 12:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 12:18 [Tarantool-patches] [PATCH v11 0/3] popen: Introduce backend engine Cyrill Gorcunov
2020-02-17 12:18 ` Cyrill Gorcunov [this message]
2020-02-17 12:18 ` [Tarantool-patches] [PATCH v11 2/3] popen: introduce a " Cyrill Gorcunov
2020-02-17 12:18 ` [Tarantool-patches] [PATCH v11 3/3] test: unit/popen Cyrill Gorcunov
2020-02-27 22:47 ` [Tarantool-patches] [PATCH v11 0/3] popen: Introduce backend engine Kirill Yukhin
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=20200217121818.11375-2-gorcunov@gmail.com \
--to=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v11 1/3] coio: export helpers' \
/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