From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <kostja.osipov@gmail.com>
Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com
 [209.85.208.194])
 (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 5AD3A441840
 for <tarantool-patches@dev.tarantool.org>;
 Mon, 30 Mar 2020 15:56:20 +0300 (MSK)
Received: by mail-lj1-f194.google.com with SMTP id n17so17937488lji.8
 for <tarantool-patches@dev.tarantool.org>;
 Mon, 30 Mar 2020 05:56:20 -0700 (PDT)
Date: Mon, 30 Mar 2020 15:56:18 +0300
From: Konstantin Osipov <kostja.osipov@gmail.com>
Message-ID: <20200330125618.GC17886@atlas>
References: <cover.1585565637.git.sergepetrenko@tarantool.org>
 <3162d52a68b95a43a0756dd2e03e4418dd80eafa.1585565637.git.sergepetrenko@tarantool.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3162d52a68b95a43a0756dd2e03e4418dd80eafa.1585565637.git.sergepetrenko@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v5 1/4] vclock: add an ability to
 reset individual clock components
List-Id: Tarantool development patches <tarantool-patches.dev.tarantool.org>
List-Unsubscribe: <https://lists.tarantool.org/mailman/options/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=unsubscribe>
List-Archive: <https://lists.tarantool.org/pipermail/tarantool-patches/>
List-Post: <mailto:tarantool-patches@dev.tarantool.org>
List-Help: <mailto:tarantool-patches-request@dev.tarantool.org?subject=help>
List-Subscribe: <https://lists.tarantool.org/mailman/listinfo/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=subscribe>
To: Serge Petrenko <sergepetrenko@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org

* Serge Petrenko <sergepetrenko@tarantool.org> [20/03/30 14:08]:
> +/**
> + * A shortcut for vclock_copy() + vclock_reset() for 0th clock
> + * component.
> + */
> +static inline void
> +vclock_copy_ignore0(struct vclock *dst, const struct vclock *src)
> +{
> +	vclock_copy(dst, src);
> +	vclock_reset(dst, 0, 0);
> +}
> +

This can be made a tad faster by merging copy + reset and removing
unnecessary branching, but is lgtm.


-- 
Konstantin Osipov, Moscow, Russia
https://scylladb.com