Re: What does it mean when a function starts with __

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

 



On Tue, Mar 08, 2005 at 07:37:52PM +0100, Sascha Effert wrote:
> has it any special meaning if a function starts with two underscores? I 
> whish to use __invalidate_device which was called in kernel 2.4 
> invalidate_device. The source of the function has not changed, so why 
> did they change the name?

The C standard defines functions prefixed with _ and __ as "internal
use for compiler or C library". The linux kernel itself doesn't care
about the C library, but the meaning is the same: "internal use for
compiler or kernel". IOW: don't use them, unless they're documented and
you know what you're doing.


Erik

-- 
Erik Mouw
J.A.K.Mouw@xxxxxxxxxxxxxx  mouw@xxxxxxxxxxxx

Attachment: signature.asc
Description: Digital signature


[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