Usage of leading underscore in linux kernel code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

The linux kernel code is full of variable or function names starting with leading
underscore(s). Example from include/linux/kernel.h :

#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1)

or

void __might_sleep(char *file, int line);

C reserves such names for its own use and prohibits usage in the source code.


Could somebody, please explain this behavior and if there are naming rules 
concerning leading underscores in kernel detail them.

Thanks,
Stephan.

p.s. If there is some document about - just point me to it.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux