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: Wed, 20 Jul 2016 17:50:45 +0300 Message-ID: <20160720145045.GA17821@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="===============5356846662893549180==" 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 --===============5356846662893549180== Content-Type: multipart/signed; micalg=x-unknown; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline --9amGYk9869ThD9tj 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. JFYI, I've finalized and merged this set_tcb_priv_data interface. --=20 ldv --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJXj4/FAAoJEAVFT+BVnCUIH2YP+QFCh3/w2uyNoVhIh6mtxJmj 5HNGVsNXRuHfugySMm9yF9OYGn0aoD9dH0uAuiBkCauhxhHdYZhgKECjqnSEaIsK ATyH1bmHYrbdaFJ/+BG9iuttL74Dp2KIsjU0A1rHZaPpoz7NDrMaOocQPvVoB6XV J5S8PQC6CmvcrpL/IYGSeY7PHUr7H0smkk0to589ZmfAlpyCQVchUyD4JdxdTQ9S 30U0mSpD4IbcxGYDZQo5XIkAbJ/Ws2dNsSuU88Iine5St02zhkqkgsF263FCpeTu MUHkjN66q1wvYIdhmbUZMKrFdeo1jSC6h7PCtggkIl271rZHLCz8UW2rD0af5Lgr wrYt1OsbZLNVXwNNklZetPOPJfe5OAfq/eVYdfp6trCkoI1jUL8NafiUnvisxHd5 PdCsm973y8/Oer8JNmL5Fw8hI1WRz8JlMHOuIx7xik34TTWNGVUlmW0aOBla3vKe 8fRVyIESyRUiyWaURg8C8zJwsOmCooYHYdKrzY0040WOSCz8IebB65P5MpN5GGmC QL/KMpMyudUnzCiRkDa5mbxfZVEEq80w6d6QMqSl6kJMeK/2wchhicsidlm2jJne TmtMLKiVIKGE4VGViv34Qp2BaLaRbRFOdzdp3x8lZXdEEMUExg09NbF9HhqV3lJ0 8xA7LmKE+skjOKMmWBfR =PcJA -----END PGP SIGNATURE----- --9amGYk9869ThD9tj-- --===============5356846662893549180== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports.http://sdm.link/zohodev2dev --===============5356846662893549180== 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 --===============5356846662893549180==--