[Tarantool-patches] [PATCH 1/4] fiber: introduce fiber.arg

Cyrill Gorcunov gorcunov at gmail.com
Mon Nov 9 17:27:17 MSK 2020


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.

Ack


More information about the Tarantool-patches mailing list