Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 1/2] fiber: remove fiber local storage
Date: Thu, 14 Jun 2018 20:33:42 +0300	[thread overview]
Message-ID: <f2ad0ca9-0d53-1d70-f26f-858719992c08@tarantool.org> (raw)
In-Reply-To: <20180613211150.GH10632@chai>

Hello. Thanks for the review!

On 14/06/2018 00:11, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [18/06/09 22:33]:
>> Replace it with more specific structures and pointers in order to
>> prepare to add `net` storage.
>>
>> This allows to make the code working with fiber storage simpler,
>> remove useless wrappers and casts, and in the next patch - remove
>> broken session.sync and add fiber sync.
> 
> Please write a comment stating that under no circumstances fiber.h
> is allowed to include application-specific headers, one only is allowed to add opaque
> pointers to the storage struct. I actually thought that you're
> going to make it more general, adopting a concept similar to Lua
> stack. Anyway, the simpler the better, we can make it more general
> when we need it, it's OK to push.

I have added the comment to the code:

@@ -331,6 +331,11 @@ struct fiber_attr {
  void
  fiber_attr_create(struct fiber_attr *fiber_attr);
  
+/**
+ * Under no circumstances this header file is allowed to include
+ * application-specific headers like session.h or txn.h. One only
+ * is allowed to announce a struct and add opaque pointer to it.
+ */
  struct session;
  struct txn;
  struct credentials;

And to the commit message.

The patchset is pushed.


>> ---
>>   src/box/session.cc  |  4 +--
>>   src/box/session.h   | 14 ++++------
>>   src/box/txn.c       |  2 +-
>>   src/box/txn.h       |  2 +-
>>   src/fiber.c         |  9 ++----
>>   src/fiber.h         | 80 +++++++++++++++++++----------------------------------
>>   src/fiber_channel.c | 31 ++++++---------------
>>   src/lua/fiber.c     | 19 ++++++-------
> 

  reply	other threads:[~2018-06-14 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-09 17:49 [tarantool-patches] [PATCH 0/2] Box.session.sync Vladislav Shpilevoy
2018-06-09 17:49 ` [tarantool-patches] [PATCH 1/2] fiber: remove fiber local storage Vladislav Shpilevoy
2018-06-13 21:11   ` [tarantool-patches] " Konstantin Osipov
2018-06-14 17:33     ` Vladislav Shpilevoy [this message]
2018-06-09 17:49 ` [tarantool-patches] [PATCH 2/2] session: fix box.session.sync() Vladislav Shpilevoy
2018-06-13 21:13   ` [tarantool-patches] " Konstantin Osipov
2018-06-09 17:58 ` [tarantool-patches] Re: [PATCH 0/2] Box.session.sync 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=f2ad0ca9-0d53-1d70-f26f-858719992c08@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 1/2] fiber: remove fiber local storage' \
    /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