From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ; Mon, 30 Mar 2020 15:56:20 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id n17so17937488lji.8 for ; Mon, 30 Mar 2020 05:56:20 -0700 (PDT) Date: Mon, 30 Mar 2020 15:56:18 +0300 From: Konstantin Osipov Message-ID: <20200330125618.GC17886@atlas> References: <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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org * Serge Petrenko [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