From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dmitry V. Levin" Subject: Re: [Intel-gfx] [PATCH v4 2/5] drm: Add private data field to trace control block Date: Tue, 24 Nov 2015 08:46:28 +0300 Message-ID: <20151124054628.GB32257@altlinux.org> References: <1440420170-13337-1-git-send-email-patrik.jakobsson@linux.intel.com> <1440420170-13337-3-git-send-email-patrik.jakobsson@linux.intel.com> <20150825211223.GD12316@vapier> <20150831123707.GA22376@patrik-desktop.isw.intel.com> <20150907165156.GB12658@altlinux.org> Reply-To: strace development list Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5022353081068083163==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: strace-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Patrik Jakobsson Cc: Intel Graphics Development , strace development list List-Id: intel-gfx@lists.freedesktop.org --===============5022353081068083163== Content-Type: multipart/signed; micalg=x-unknown; protocol="application/pgp-signature"; boundary="Yylu36WmvOXNoKYn" Content-Disposition: inline --Yylu36WmvOXNoKYn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 07, 2015 at 08:23:57PM +0200, Patrik Jakobsson wrote: > On Mon, Sep 7, 2015 at 6:51 PM, Dmitry V. Levin wrote: > > On Mon, Aug 31, 2015 at 02:37:07PM +0200, Patrik Jakobsson wrote: > > [...] > >> Here's my take on it (I assume it needs some discussion): > >> > >> int > >> set_tcb_priv_data(struct tcb *tcp, void *priv_data) > >> { > >> /* A free callback is required before setting private data and p= rivate > >> * data must be set back to NULL before being set again. > >> */ > > > > I think a single function initializing both _priv_data and _free_priv_d= ata > > would suffice: > > > > int > > set_tcb_priv_data(struct tcb *tcp, void *priv_data, > > void (*free_priv_data)(void *)) > > { > > if (tcp->_priv_data) > > return -1; > > > > tcp->_free_priv_data =3D free_priv_data; > > tcp->_priv_data =3D priv_data; > > > > return 0; > > } >=20 > Sure, and since they always come in a pairs it might be even better. If i= t turns > out we need it split up it is easily done later. The discussion seems to be stalled. Patrik, would you like to prepare a patch? --=20 ldv --Yylu36WmvOXNoKYn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWU/m0AAoJEAVFT+BVnCUISRkQAMAVB8IGZbuO4EZAskct0UeN Tsp5zUzeYxkaSf3PaB8B/acLT7ZJou43KQbkfnuiX1CxQiVWyCrhQwiumUhtgrRt FJBLrZhdC9hnfj4EXE8UarD96x19LUSGXXw5vIAGprQKJ8QSXkEquBmrU5pstK7Y X7EX7vL43izZGVRz1JAWc+oY3oFYMhh3RL1b28+jIeguB3uY9jNKIW8R4x52be0r 03zsghnTGub2K5q0zHcp6gyAYO3j6fpp6KglMHndcPMQW/kqA2eeUIXGtSG5XwE6 ASyhEjmFdjuyyr5alVTDX7W29JF3FmCvAK1AeDX6BqGH36mbRz3zUJLd+oi9UJye 6vnf/PC9KxIx3HmI0xhSPxzC9ZmvoPhBplqB7AgY/AaR1QCg8hddM3VaTO31cgUa HxpCyCFPHkF8BKsg89AZM4VkFY9sfmjxtWpv7ka7Q7V5CEJw0VHXy/ZshrpzySxJ Wic1n53GBCm0+j6cu3d+mmzOHsYfqGfKChYLX5UJSZX/UGKpEOFoiuCjOzE9/3LX ArNTBn7wnTU5OKgUe0EC2ZOIg5XAsUUmV/08Lwqp51TDRso2Gdf/sY6glMTOjXuY k/SygcbAW+2MD+cmfoeAGPX4AdKzFhEgabnUiT5q7mLonzyDqRp2oUntkGgjWtsw 3lDN5cxSUN3wFq8CBbUi =Aulz -----END PGP SIGNATURE----- --Yylu36WmvOXNoKYn-- --===============5022353081068083163== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140 --===============5022353081068083163== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Strace-devel mailing list Strace-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/strace-devel --===============5022353081068083163==--