[PATCH] Add pretty printers for the NPTL lock types

Joseph Myers joseph@codesourcery.com
Tue May 19 16:49:00 GMT 2015


On Tue, 19 May 2015, Martin Galvan wrote:

> > It generates a C source file that uses the C constant as an asm operand,
> > in an asm containing special text that can then be matched in the compiler
> > output to extract the value of a constant.
> 
> So if I understood correctly, what you're asking me to do is to take
> the macros out of the header files, place them in a .sym file and have
> a script generate both a .h and a .py with those values?

No.  The numerical values stay in the .h files.  The .sym file contains 
only the names, and the gen-as-const machinery uses the compiler to 
extract the corresponding values.  The only header changes needed are to 
comments, to say that if the *set of values in the enum (etc.)* changes 
then the pretty printers should be updated.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list