Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: v.shpilevoy@tarantool.org,
	Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v1 1/4] box: introduce new helpers in column_mask.h
Date: Fri, 22 Feb 2019 21:01:01 +0300	[thread overview]
Message-ID: <20190222180101.GB12852@chai> (raw)
In-Reply-To: <e7ff60b6e96c7a41acfbed46f251b8128a0057e6.1549629707.git.kshcherbatov@tarantool.org>

* Kirill Shcherbatov <kshcherbatov@tarantool.org> [19/02/08 16:22]:
> Refactored column_mask.h definitions: introduced a new routine
> column_mask_is_overflowed, column_mask_is_set and macro
> COLUMN_MASK_BIT, COLUMN_MASK_SIZE.
> We need this helpers in further refactoring.
> 
> Needed for #3571
> ---
>  src/box/column_mask.h | 39 +++++++++++++++++++++++++++++++++------
>  1 file changed, 33 insertions(+), 6 deletions(-)
> 
> diff --git a/src/box/column_mask.h b/src/box/column_mask.h
> index d71911d46..6e9c0f81a 100644
> --- a/src/box/column_mask.h
> +++ b/src/box/column_mask.h
> @@ -50,7 +50,9 @@
>   * in such case we set not one bit, but a range of bits.
>   */
>  
> -#define COLUMN_MASK_FULL UINT64_MAX
> +#define COLUMN_MASK_FULL	UINT64_MAX
> +#define COLUMN_MASK_BIT(n)	(((uint64_t)1)<<(n))
> +#define COLUMN_MASK_SIZE	((int)(sizeof(uint64_t)*8))

Please use CHAR_BIT constant instead of 8.

The patch otherwise looks good to me.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

  parent reply	other threads:[~2019-02-22 18:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 12:52 [tarantool-patches] [PATCH v1 0/4] sql: replace 32 bit column mask Kirill Shcherbatov
2019-02-08 12:52 ` [tarantool-patches] [PATCH v1 1/4] box: introduce new helpers in column_mask.h Kirill Shcherbatov
2019-02-15 17:05   ` [tarantool-patches] " Vladislav Shpilevoy
2019-02-20 13:42     ` Kirill Shcherbatov
2019-02-22 17:51       ` Vladislav Shpilevoy
2019-02-22 18:01   ` Konstantin Osipov [this message]
2019-02-22 18:22     ` Konstantin Osipov
2019-02-08 12:52 ` [tarantool-patches] [PATCH v1 2/4] sql: use 64b bitmasks instead of 32b where possible Kirill Shcherbatov
2019-02-15 17:05   ` [tarantool-patches] " Vladislav Shpilevoy
2019-02-20 13:42     ` Kirill Shcherbatov
2019-02-08 12:52 ` [tarantool-patches] [PATCH v1 3/4] sql: got rid of redundant MASKBIT32 definition Kirill Shcherbatov
2019-02-15 17:05   ` [tarantool-patches] " Vladislav Shpilevoy
2019-02-20 13:42     ` Kirill Shcherbatov
2019-02-08 12:52 ` [tarantool-patches] [PATCH v1 4/4] sql: got rid of redundant bitmask helpers Kirill Shcherbatov
2019-02-15 17:05   ` [tarantool-patches] " Vladislav Shpilevoy
2019-02-20 13:42     ` Kirill Shcherbatov
2019-02-22 17:52       ` Vladislav Shpilevoy

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=20190222180101.GB12852@chai \
    --to=kostja@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='[tarantool-patches] Re: [PATCH v1 1/4] box: introduce new helpers in column_mask.h' \
    /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