Re: [patch 02/41] cpu alloc: The allocator

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

 



Andrew wrote:
> > > > +#define CPU_PTR(__p, __cpu)	SHIFT_PERCPU_PTR((__p), per_cpu_offset(__cpu))
> > > 
> > > eek, a major interface function which is ALL IN CAPS!
> > > 
> > > can we do this in lower-case?  In a C function?
> > 
> > No. This is a macro and therefore uppercase (there is macro magic going on 
> > that ppl need to be aware of). AFAICR you wanted it this way last year. C 
> > function not possible because of the type checking.
> 
> urgh.  This is a C-convention versus kernel-convention thing.  The C
> convention exists for very good reasons.  But it sure does suck.
> 
> What do others think?

A few, key symbols get to be special ... short but distinctive names
that become (in)famous.  The classic was "u", for the per-user
structure, aka the "user area", in old Unix kernels.  In people's
names, a few one word or first names such as "Ike", "Madonna", "Ali",
"Tiger", "Cher", "Mao", "OJ", "Plato", "Linus", ... have become
distinctive and well known to many people.

How about "_pcpu", instead of CPU_PTR?  "_pcpu" is a short, unique
(not currently in use) symbol that, tersely, says what we want to say.

Yes - it violates multiple conventions.  "The Boss" (Bruce Springsteen)
gets to do that.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@xxxxxxx> 1.940.382.4214
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux