From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 10BC319C0036 for ; Tue, 27 Oct 2015 04:43:47 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 7589BB5D833 for ; Tue, 27 Oct 2015 05:11:30 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 84394952408 for ; Tue, 27 Oct 2015 05:11:30 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 4942912046B; Tue, 27 Oct 2015 05:11:28 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by neon.ruby-lang.org (Postfix) with ESMTP id DFD91120455 for ; Tue, 27 Oct 2015 05:11:23 +0900 (JST) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 0AF6F1FDE7; Mon, 26 Oct 2015 20:11:22 +0000 (UTC) Date: Mon, 26 Oct 2015 20:11:21 +0000 From: Eric Wong To: Ruby developers Message-ID: <20151026201121.GA17620@dcvr.yhbt.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ML-Name: ruby-core X-Mail-Count: 71196 Subject: [ruby-core:71196] Re: [Ruby trunk - Feature #11607] [PATCH] fiddle: release GVL for ffi_call X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" KOSAKI Motohiro wrote: > On Tue, Oct 20, 2015 at 6:28 PM, wrote: > > Issue #11607 has been updated by Eric Wong. > > > > File fiddle-release-GVL-for-ffi_call-v2.patch added > > > > v2 fixes a warning I did not notice before, interdiff: > > ~~~ > > --- a/ext/fiddle/closure.c > > +++ b/ext/fiddle/closure.c > > @@ -64,7 +64,7 @@ struct callback_args { > > void *ctx; > > }; > > > > -static void > > +static void * > > with_gvl_callback(void *ptr) > > { > > struct callback_args *x = ptr; > > @@ -177,6 +177,7 @@ with_gvl_callback(void *ptr) > > default: > > rb_raise(rb_eRuntimeError, "closure retval: %d", type); > > } > > + return 0; > > This interdiff is really ugly to me. Do we really have no other way? I'm not sure what you mean. I made the change to match the signature of rb_thread_call_with_gvl, and I think rb_thread_call_with_gvl is a reasonable API. I could do s/0/NULL/ if that's what you mean. I don't have a strong opinion on '0' vs 'NULL', and Ruby source seems to use both.