From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9446 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 0/2] add sched_getcpu, take n+1 Date: Wed, 2 Mar 2016 22:01:39 -0500 Message-ID: <20160303030139.GU9349@brightrain.aerifal.cx> References: <20160302055542.GN9349@brightrain.aerifal.cx> <1456935987-24047-1-git-send-email-nathan@nathan7.eu> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1456974122 29125 80.91.229.3 (3 Mar 2016 03:02:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2016 03:02:02 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9459-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 03 04:01:55 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1abJWU-0000qw-Qc for gllmg-musl@m.gmane.org; Thu, 03 Mar 2016 04:01:54 +0100 Original-Received: (qmail 32344 invoked by uid 550); 3 Mar 2016 03:01:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 32326 invoked from network); 3 Mar 2016 03:01:51 -0000 Content-Disposition: inline In-Reply-To: <1456935987-24047-1-git-send-email-nathan@nathan7.eu> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9446 Archived-At: On Wed, Mar 02, 2016 at 05:26:25PM +0100, Nathan Zadoks wrote: > > Wrong macro in the #ifdef. > Whoops, thanks, fixed! > > > Not a big deal, but usually in musl we use 0 rather than the NULL > > macro. > Learnt a new thing there - fixed! > > > Actually I wondered if the function actually needs to take the useless > > extra 2 arguments, but I think for the sake of correctness it's best > > to do it this way -- the callee in the vdso has 3 args, so it should > > be called with the correct type. > The second argument actually needs to be null: it's an out pointer for > an identifier for the NUMA node. sched_getcpu doesn't have a spot for > returning it, so we pass a null pointer there, which ignores it. > The *third* argument is a pointer to a now-unused cache structure, > and could probably be omitted safely. It's required to be non-NULL on kernels > older than 2.6.23, but we'd just end up corrupting random memory there > instead of getting an EFAULT. Not worth saving a register zeroing instruction. Agreed. > > One other thing I thought might be nice is initially committing the > > trivial syscall-only version that adds the public prototype, then > > doing vdso support as a separate commit, but if that's a pain to do > > don't worry about it. > No problem! Some git trickery later, I've got this sorted. Great. Applying now. Thanks! Rich