Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Subject: [Tarantool-patches] [PATCH 13/17] recovery: cxx to c transition
Date: Tue, 28 Apr 2020 19:11:33 +0300	[thread overview]
Message-ID: <20200428161137.20536-14-gorcunov@gmail.com> (raw)
In-Reply-To: <20200428161137.20536-1-gorcunov@gmail.com>

We're ready now to compile the recovery
code in plain C mode.

Part of #3794

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 src/box/CMakeLists.txt              |  2 +-
 src/box/{recovery.cc => recovery.c} | 15 +++++++++------
 src/box/recovery.h                  |  8 ++++----
 3 files changed, 14 insertions(+), 11 deletions(-)
 rename src/box/{recovery.cc => recovery.c} (98%)

diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt
index c931ecdfe..34febf026 100644
--- a/src/box/CMakeLists.txt
+++ b/src/box/CMakeLists.txt
@@ -131,7 +131,7 @@ add_library(box STATIC
     user.cc
     authentication.cc
     replication.cc
-    recovery.cc
+    recovery.c
     xstream.cc
     applier.cc
     relay.cc
diff --git a/src/box/recovery.cc b/src/box/recovery.c
similarity index 98%
rename from src/box/recovery.cc
rename to src/box/recovery.c
index 1b5b51b7f..510235ac1 100644
--- a/src/box/recovery.cc
+++ b/src/box/recovery.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2016, Tarantool AUTHORS, please see AUTHORS file.
+ * Copyright 2010-2020, Tarantool AUTHORS, please see AUTHORS file.
  *
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
@@ -30,11 +30,8 @@
  */
 #include "recovery.h"
 
-#include "small/rlist.h"
-#include "scoped_guard.h"
 #include "trigger.h"
 #include "fiber.h"
-#include "xlog.h"
 #include "xrow.h"
 #include "xstream.h"
 #include "wal.h" /* wal_watcher */
@@ -424,15 +421,21 @@ wal_subscr_wakeup(struct wal_subscr *ws, unsigned int events)
 }
 
 static void
-wal_subscr_dir_stat_cb(struct ev_loop *, struct ev_stat *stat, int)
+wal_subscr_dir_stat_cb(struct ev_loop *loop, struct ev_stat *stat, int revents)
 {
+	(void)revents;
+	(void)loop;
+
 	struct wal_subscr *ws = (struct wal_subscr *)stat->data;
 	wal_subscr_wakeup(ws, WAL_EVENT_ROTATE);
 }
 
 static void
-wal_subscr_file_stat_cb(struct ev_loop *, struct ev_stat *stat, int)
+wal_subscr_file_stat_cb(struct ev_loop *loop, struct ev_stat *stat, int revents)
 {
+	(void)revents;
+	(void)loop;
+
 	struct wal_subscr *ws = (struct wal_subscr *)stat->data;
 	wal_subscr_wakeup(ws, WAL_EVENT_WRITE);
 }
diff --git a/src/box/recovery.h b/src/box/recovery.h
index 5e2826fee..20fd9998b 100644
--- a/src/box/recovery.h
+++ b/src/box/recovery.h
@@ -88,10 +88,6 @@ recovery_stop_local(struct recovery *r);
 int
 recovery_finalize(struct recovery *r);
 
-#if defined(__cplusplus)
-} /* extern "C" */
-#endif /* defined(__cplusplus) */
-
 /**
  * Find out if there are new .xlog files since the current
  * vclock, and read them all up.
@@ -106,4 +102,8 @@ int
 recover_remaining_wals(struct recovery *r, struct xstream *stream,
 		       const struct vclock *stop_vclock, bool scan_dir);
 
+#if defined(__cplusplus)
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
 #endif /* TARANTOOL_RECOVERY_H_INCLUDED */
-- 
2.20.1

  parent reply	other threads:[~2020-04-28 16:14 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 16:11 [Tarantool-patches] [PATCH 00/17] recovery: move from cxx to c code Cyrill Gorcunov
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 01/17] recovery: do not call recovery_stop_local inside recovery_delete Cyrill Gorcunov
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 02/17] recovery: convert WalSubscription class to structure Cyrill Gorcunov
2020-05-03 18:42   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 03/17] recovery: recovery_close_log -- don't throw exception Cyrill Gorcunov
2020-05-03 18:43   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 04/17] recovery: recovery_open_log " Cyrill Gorcunov
2020-05-03 18:43   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 05/17] recovery: recover_xlog " Cyrill Gorcunov
2020-05-03 18:44   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 06/17] recovery: recover_remaining_wals " Cyrill Gorcunov
2020-05-03 18:44   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 07/17] recovery: hot_standby_f " Cyrill Gorcunov
2020-05-03 18:45   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 08/17] recovery: recovery_follow_local " Cyrill Gorcunov
2020-05-03 18:46   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 09/17] recovery: recovery_new " Cyrill Gorcunov
2020-05-03 18:47   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 10/17] recovery: recovery_scan " Cyrill Gorcunov
2020-05-03 18:47   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 11/17] recovery: recovery_finalize " Cyrill Gorcunov
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 12/17] recovery: recovery_stop_local " Cyrill Gorcunov
2020-05-03 18:47   ` Vladislav Shpilevoy
2020-04-28 16:11 ` Cyrill Gorcunov [this message]
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 14/17] recovery: drop redundant type_XlogGapError Cyrill Gorcunov
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 15/17] recovery: provide throwable wrappers Cyrill Gorcunov
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 16/17] box: use _xc helpers of recovery code Cyrill Gorcunov
2020-05-03 18:47   ` Vladislav Shpilevoy
2020-04-28 16:11 ` [Tarantool-patches] [PATCH 17/17] relay: use _xc recovery helpers Cyrill Gorcunov
2020-04-28 16:24 ` [Tarantool-patches] [PATCH 01/17] recovery: do not call recovery_stop_local inside recovery_delete Cyrill Gorcunov

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=20200428161137.20536-14-gorcunov@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 13/17] recovery: cxx to c transition' \
    /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