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: [PATCHv2] PowerPC - Add a faster way to read the Time Base register


On Wed, Feb 22, 2012 at 4:05 PM, Steve Munroe <sjmunroe@us.ibm.com> wrote:
>> I have nothing to say about the code itself, and I understand the
>> reason for wanting these kinds of snippets in user.h on glibc since
>> all users can use them immediately.
>>
>> However, I guess my question is as follows, and please stop me if I'm
>> completely wrong, wouldn't it be better to add this kind of routine to
>> the Power ABI and export it via a different header?
>>
> The Timebase is defined by the PowerISA and has been since V1.0.

I'm not talking about an ISA.

> We get this request alot! And it looks like user.h was intended for this
> type of platform dependent stuff.

I agree that it's a useful request and users often butcher the inline assembly.

I do not agree that sys/user.h was intended for this type of platform
dependent stuff.

As far as I can tell it is a BSD legacy header intended to contain
`struct user' and the things it required.

> The ABI does not have headers, Packages do! So I don't see how defining it
> in the ABI helps.

If you don't want to call it an ABI, call it a standard.

> So what package and what header would you propose? That normal people can
> find and use?

I am OK with shipping the header in glibc, these kinds of core headers
belong with the implementation in either gcc or glibc.

What I would like to see is a discussion about "What do we do with
platform macros that follow no standard and how do we expose them to
users?"

I would rather we create a whole new header, platform.h, and ship that
as the location for platform macros that follow no standard.

Cheers,
Carlos.


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