From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 9784F5B359; Sun, 24 Jan 2021 19:28:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9784F5B359 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611505717; bh=bxY3Ca4TVjnLLNJqoWobC67d+wJs2eH84kEn85ty8vw=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ydcYALtD4MJFfwVheWnOyqpeut/jtTkKGZGv2v+0hzjoUgvXp1eAfe2SufoMiZP6e yX6dS9XaXIPI1Ih6Y/E6LC+zSQZfj1BJfr44RB0cVsPe5st81KVx7pbhlum9kQfqwX cKwW/dDDtNxuk6TLuvM01piBAWuXKkV5lPv8SK1E= 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 C68FD57E49 for ; Sun, 24 Jan 2021 19:27:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C68FD57E49 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1l3iEi-0007IV-AQ; Sun, 24 Jan 2021 19:27:36 +0300 To: Cyrill Gorcunov , tml References: <20210118203556.281700-1-gorcunov@gmail.com> <20210118203556.281700-6-gorcunov@gmail.com> Message-ID: <5433464e-767f-bb63-0723-ef0752490a5e@tarantool.org> Date: Sun, 24 Jan 2021 17:27:35 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20210118203556.281700-6-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9F0E84CC1954AA4380A9873322CD039BEC171744CCDDEE96200894C459B0CD1B92EECE55EE21E72755D9C9FF6407DA0B5E677AB1C9F20D3C8D5D5E52AFDF0C1B1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C42AF033AFE07300EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F1FEB73A813C0D3B8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC520051DBA2F12A10DBCF88C5A1BBE8E4AB2781B777827547389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07734D68A6916D8318941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6D52CD31C43BF465FCC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FC654CE8ED7C2D004275ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4930A3850AC1BE2E7354DCCFF368A6260CFC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0FECB2555BB02FD5A93B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5B827B101F07F33B9601BCDBF7B63CE95E11585DDB48D7E8CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346B71C4B0698719D7C19B03231808F9DDA6C03BA6B42337E38BB7D4F5081C58DEF1667F6E4E6EBE321D7E09C32AA3244CC8B67B4C512722AB5C9CC6796327BA0F3FD9C8CA1B0515E0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojEcKN7r9rK/14GhMU6ty81Q== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822453FFA877F3FB617CA09FB9155A3B0D83841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v12 5/8] module_cache: rename calls to ref in module structure X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! Why isn't it in the third commit ("improve naming")? On 18.01.2021 21:35, Cyrill Gorcunov wrote: > We will use this field not only to count a number of > active calls to the module but to prevent the module > from disappear when it get loaded via "cmod" interface > (will be implemented in next patches). > > Same time make it 64 bit long since there might be a > number of such references size_t didn't prevent from > numeric overflow. > > Part-of #4642 > > Signed-off-by: Cyrill Gorcunov > --- > src/box/module_cache.c | 8 ++++---- > src/box/module_cache.h | 4 ++-- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/src/box/module_cache.c b/src/box/module_cache.c > index 48e55f421..ae874caab 100644 > --- a/src/box/module_cache.c > +++ b/src/box/module_cache.c > @@ -214,7 +214,7 @@ module_load(const char *package, const char *package_end) > memcpy(module->package, package, package_len); > module->package[package_len] = 0; > rlist_create(&module->funcs_list); > - module->calls = 0; > + module->ref = 0; I propose to be consistent with the other code and call it 'refs' instead of 'ref' (see struct error, struct tuple, struct tuple_format). > const char *tmpdir = getenv("TMPDIR"); > if (tmpdir == NULL)