From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 784894696CC for ; Tue, 28 Apr 2020 19:14:33 +0300 (MSK) Received: by mail-lf1-f65.google.com with SMTP id d25so2449053lfi.11 for ; Tue, 28 Apr 2020 09:14:33 -0700 (PDT) From: Cyrill Gorcunov Date: Tue, 28 Apr 2020 19:11:33 +0300 Message-Id: <20200428161137.20536-14-gorcunov@gmail.com> In-Reply-To: <20200428161137.20536-1-gorcunov@gmail.com> References: <20200428161137.20536-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 13/17] recovery: cxx to c transition List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml We're ready now to compile the recovery code in plain C mode. Part of #3794 Signed-off-by: Cyrill Gorcunov --- 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