From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D46E744643A for ; Tue, 10 Nov 2020 02:59:06 +0300 (MSK) References: <8642a26fc2530318c1ef755d706d6bedc9d59684.1604858551.git.v.shpilevoy@tarantool.org> <20201109142717.GJ2339@grain> From: Vladislav Shpilevoy Message-ID: <4d57db9b-37c5-923d-12d4-8949437e75c2@tarantool.org> Date: Tue, 10 Nov 2020 00:59:05 +0100 MIME-Version: 1.0 In-Reply-To: <20201109142717.GJ2339@grain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 1/4] fiber: introduce fiber.arg List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the review! On 09.11.2020 15:27, Cyrill Gorcunov wrote: > On Sun, Nov 08, 2020 at 07:03:54PM +0100, Vladislav Shpilevoy wrote: >> @@ -565,7 +565,19 @@ struct fiber { >> * See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31488 >> */ >> fiber_func f; >> - va_list f_data; >> + union { >> + /** >> + * Argument list passed when the fiber is invoked in a blocking >> + * way, so the caller may pass arguments from its own stack. >> + */ >> + va_list f_data; >> + /** >> + * Fiber function argument which passed asynchronously. Can be >> + * used not to call fiber_start to avoid yields, but still pass >> + * something into the fiber. >> + */ >> + void *arg; > > Won't be better to call it "f_arg" instead? To match f_ prefix used in f_data. > This gonna be more suitable for grepping. Since such rename would cause you > to update other patches up to you, if you prefer plain "arg" I'm ok. Ok, sounds reasonable. Renamed.