Shailabh Nagar wrote:
> Jay Lan wrote:
>> There were a few accounting data/macros that are used in CSA
>> but are #ifdef'ed inside CONFIG_BSD_PROCESS_ACCT. This patch is
>> to change those ifdef's from CONFIG_BSD_PROCESS_ACCT to
>> CONFIG_CSA_ACCT. A few defines are moved from kernel/acct.c and
>> include/linux/acct.h to kernel/csa.c and include/linux/csa_kern.h.
>>
>>
>> Signed-off-by: Jay Lan <[email protected]>
[snip]
>> +#ifdef CONFIG_CSA_ACCT
>> +extern void acct_update_integrals(struct task_struct *tsk);
>> +extern void acct_clear_integrals(struct task_struct *tsk);
>> +#else
>> +#define acct_update_integrals(x) do { } while (0)
>> +#define acct_clear_integrals(task) do { } while (0)
>> +#endif
>> +
>
> static inlines preferred
Huh? Is that a preference to the taskstat project? For the kernel
itself it makes no difference.
Cheers,
Jes
On Wed, 02 Aug 2006 09:26:02 +0200
Jes Sorensen <[email protected]> wrote:
> Shailabh Nagar wrote:
> > Jay Lan wrote:
> >> There were a few accounting data/macros that are used in CSA
> >> but are #ifdef'ed inside CONFIG_BSD_PROCESS_ACCT. This patch is
> >> to change those ifdef's from CONFIG_BSD_PROCESS_ACCT to
> >> CONFIG_CSA_ACCT. A few defines are moved from kernel/acct.c and
> >> include/linux/acct.h to kernel/csa.c and include/linux/csa_kern.h.
> >>
> >>
> >> Signed-off-by: Jay Lan <[email protected]>
>
> [snip]
>
> >> +#ifdef CONFIG_CSA_ACCT
> >> +extern void acct_update_integrals(struct task_struct *tsk);
> >> +extern void acct_clear_integrals(struct task_struct *tsk);
> >> +#else
> >> +#define acct_update_integrals(x) do { } while (0)
> >> +#define acct_clear_integrals(task) do { } while (0)
> >> +#endif
> >> +
> >
> > static inlines preferred
>
> Huh? Is that a preference to the taskstat project? For the kernel
> itself it makes no difference.
static inlines provide typechecking and typo checking and presence-of-x
checking when the option is configged off. They can also suppress unused
variable warnings.
And they're C, not cpp ;)
Andrew Morton wrote:
> On Wed, 02 Aug 2006 09:26:02 +0200
> Jes Sorensen <[email protected]> wrote:
>> Shailabh Nagar wrote:
>>> static inlines preferred
>> Huh? Is that a preference to the taskstat project? For the kernel
>> itself it makes no difference.
>
> static inlines provide typechecking and typo checking and presence-of-x
> checking when the option is configged off. They can also suppress unused
> variable warnings.
>
> And they're C, not cpp ;)
That I agree with, I guess I normally just draw the line between
functions that do actual work versus empty dummies like in this case.
Cheers,
Jes