This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add futex wrapper to glibc?


On Thu, Oct 23, 2014 at 09:06:17PM +0000, Joseph S. Myers wrote:
> On Thu, 23 Oct 2014, Carlos O'Donell wrote:
> 
> > We are IMO at the stage where futex is stable, few things are changing,
> > and with documentation in place, I would consider adding a futex wrapper.
> > However, per other discussions on errors, I'd actually add a non-trivial
> > C wrapper to enforce that the kernel does not return error codes that
> > are unexpected.
> 
> I don't think that makes sense for futex.  I think such checks only make 
> sense where glibc is making use of futex within its own code - there it 
> may sometimes be useful to sanity-check results match glibc's 
> expectations.  I also think it's desirable for any such syscall wrapper to 
> be usable with futex operations that may be added to the kernel in future 
> (i.e. someone should only need new kernel headers to build code using new 
> operations, not a new glibc binary that knows how to check things for 
> those new operations).

Agreed, let the caller deal with the return values. When used directly, glibc
should not be acting on any of the return codes as they are needed by the
implementation (which is outside of glibc).

-- 
Darren Hart
Intel Open Source Technology Center


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]