Re: [patch 2.6.12-rc1-mm4] fork_connector: add a fork connector

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

 



Guillaume Thouvenin <[email protected]> wrote:
>
>   This patch adds a fork connector in the do_fork() routine.

>  
> +config FORK_CONNECTOR
> +	bool "Enable fork connector"
> +	depends on CONNECTOR=y

This kind of defeats connector's ability to be built as a module.  Doing

	select CONNECTOR

may be better here.

> +static void cn_fork_callback(void *data) 
> +{
> +	struct cn_msg *msg = (struct cn_msg *)data;

The cast is unnecessary.

>  
>  extern int cn_already_initialized;
> +extern int cn_fork_enable;
> +extern struct cb_id cb_fork_id;

Should these declarations be inside CONFIG_FORK_CONNECTOR?

> +
> +static DEFINE_PER_CPU(unsigned long, fork_counts);
> +

This will cause fork_counts to be defined in each compilation unit which
includes this header file.  You should use DEFINE_PER_CPU in .c and
DECLARE_PER_CPU in .h.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux