What does double underscore in a variable name mean in C?

Possible duplicate:
Why do people use __ (double underscore) so much in C ++

I studied the Linux kernel code.

There are some data structures and functions starting with double underscores such as:

__u32 len 

How is this different from regular variables?

+7
c linux kernel
source share
3 answers

This means that this is a system reserved name. The C standard states that all names starting with two underscores, or underscores and uppercase letters are reserved for system or compiler use and should not be defined in application code.

+12
source share

The other answers are true that they are reserved for implementation. Of course, here Linux should evolve from the 20th century and use the standard type uint32_t , rather than the many non-standard names ( __u32 , u_int32_t , ...) that plagued obsolete Unices ..

+2
source share

This is the type defined in here (as well as several other places).

As a rule, double underscore in front of a type, variable or function name implies a name that is always reserved as defined in section 7.1.3 of the current standard (C99).

+1
source share

All Articles