From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 27 Mar 2019 12:35:10 +0300 From: Vladimir Davydov Subject: Re: [PATCH 1/2] lib/core/fiber: Rename stack_direction to stack_growsdown Message-ID: <20190327093510.f6jtxo35kwsv7ywg@esperanza> References: <20190319193845.31221-1-gorcunov@gmail.com> <20190319193845.31221-2-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190319193845.31221-2-gorcunov@gmail.com> To: Cyrill Gorcunov Cc: tml List-ID: On Tue, Mar 19, 2019 at 10:38:44PM +0300, Cyrill Gorcunov wrote: > Since growsdown (or growsup) is more clear and common name. > --- > src/lib/core/fiber.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/src/lib/core/fiber.c b/src/lib/core/fiber.c > index c55b3ab39..922a0bfe8 100644 > --- a/src/lib/core/fiber.c > +++ b/src/lib/core/fiber.c > @@ -105,7 +105,7 @@ __thread struct cord *cord_ptr = NULL; > pthread_t main_thread_id; > > static size_t page_size; > -static int stack_direction; > +static bool stack_growsdown; > > enum { > /* The minimum allowable fiber stack size in bytes */ > @@ -808,7 +808,7 @@ fiber_stack_recycle(struct fiber *fiber) > * it anyway. > */ > void *start, *end; > - if (stack_direction < 0) { > + if (stack_growsdown) { TBO I like stack_direction more as it's looks symmetrical, so to say. I'd refrain from changing this if there's no other reason rather than personal taste.