Tarantool development patches archive
 help / color / mirror / Atom feed
From: Oleg Babin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladimir Davydov <vdavydov@tarantool.org>,
	Oleg Babin via Tarantool-patches
	<tarantool-patches@dev.tarantool.org>
Cc: tml <tarantool-patches@dev.tarantool.org>, v.shpilevoy@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v4 0/4] fiber: keep reference to userdata if fiber created once
Date: Thu, 9 Sep 2021 13:45:10 +0300	[thread overview]
Message-ID: <585fda5d-1598-b28a-9f22-61f1f7eb9360@tarantool.org> (raw)
In-Reply-To: <20210909102116.j7jlyfdmyngtx4ot@esperanza>

Thanks for your review.

On 09.09.2021 13:21, Vladimir Davydov via Tarantool-patches wrote:
> On Wed, Sep 08, 2021 at 09:19:58PM +0300, Oleg Babin via Tarantool-patches wrote:
>>    [2] https://github.com/tarantool/tarantool/pull/6280
> Reviewed in the PR.


Fixed. Diff:


diff --git a/src/lib/core/fiber.h b/src/lib/core/fiber.h
index 9ac0cbb9f..67e1a55e3 100644
--- a/src/lib/core/fiber.h
+++ b/src/lib/core/fiber.h
@@ -45,6 +45,14 @@

  #include <coro/coro.h>

+/*
+ * This constant is the same as LUA_NOREF. It should be used
+ * to initialize all Lua references in struct fiber.
+ * Since this module is independent on Lua the constant is
+ * defined directly. Value should be checked with
+ * static_assert in appropriate places to catch possible
+ * LUA_NOREF value changes in future.
+ */
  #define FIBER_LUA_NOREF (-2)

  /*
@@ -627,7 +635,7 @@ struct fiber {
              struct lua_State *stack;
              /**
               * Optional reference to userdata
-             * represented current fiber id in Lua.
+             * representing current fiber id in Lua.
               */
              int fid_ref;
              /**
diff --git a/src/lua/fiber.c b/src/lua/fiber.c
index 12836da69..95634a4d0 100644
--- a/src/lua/fiber.c
+++ b/src/lua/fiber.c
@@ -38,6 +38,7 @@

  #include <lua.h>
  #include <lauxlib.h>
+
  static_assert(FIBER_LUA_NOREF == LUA_NOREF, "FIBER_LUA_NOREF is ok");

  void


      reply	other threads:[~2021-09-09 10:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 18:19 Oleg Babin via Tarantool-patches
2021-09-08 18:19 ` [Tarantool-patches] [PATCH v4 1/4] fiber: rename ref to storage_ref Oleg Babin via Tarantool-patches
2021-09-08 18:20 ` [Tarantool-patches] [PATCH v4 2/4] fiber: pass struct fiber into lbox_pushfiber instead of id Oleg Babin via Tarantool-patches
2021-09-08 18:20 ` [Tarantool-patches] [PATCH v4 3/4] fiber: correctly initialize storage_ref value Oleg Babin via Tarantool-patches
2021-09-08 18:20 ` [Tarantool-patches] [PATCH v4 4/4] fiber: keep reference to userdata if fiber created once Oleg Babin via Tarantool-patches
2021-09-08 20:45 ` [Tarantool-patches] [PATCH v4 0/4] " Vladislav Shpilevoy via Tarantool-patches
2021-09-09 10:21 ` Vladimir Davydov via Tarantool-patches
2021-09-09 10:45   ` Oleg Babin via Tarantool-patches [this message]

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=585fda5d-1598-b28a-9f22-61f1f7eb9360@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=olegrok@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --cc=vdavydov@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v4 0/4] fiber: keep reference to userdata if fiber created once' \
    /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