Re: [PATCH 1/2] x86: Rename __task_delta_exec() to task_delta_exec_locked()

From: Hidetoshi Seto
Date: Mon Mar 23 2009 - 05:13:47 EST


Peter Zijlstra wrote:
> On Mon, 2009-03-23 at 14:11 +0900, Hidetoshi Seto wrote:
>> Externing function with prefix "__" is unpleasant.
>> This patch renames the function and fix the caller.
>> This change is desirable for other fix that against posix clocks,
>> since the fix introduces another __task_delta_exec() which is static.
>
> There's nothing wrong with __ prefixed functions, the core kernel is
> stuffed with them, and its a well known prefix for functions that need
> special care.

I often suppose that the functions with __ prefix is used for a kind of
(local) subroutine that mostly used internally in the *.c file, and that
therefore it is often defined as static (or static inline).

I also suppose that __Func() followed by Func() is called from Func()
(and its relatives, like Func_foo() or Func_bar() etc., if exists)
as a common core part of Func().

> Furthermore your argument seems contradictory in that it
> introduces one.

I thought it is acceptable since the introduced one is static.

Still I feel uneasy about the non-static __Func(), however it is
easy to fix with a little patients.
Wait a moment for next patch (it will be a single patch, v3).


Thanks,
H.Seto

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/