Re: [take12 3/3] kevent: Timer notifications.

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

 



On Mon, Aug 21, 2006 at 12:12:39PM +0100, Christoph Hellwig ([email protected]) wrote:
> > +static int __init kevent_init_timer(void)
> > +{
> > +	struct kevent_callbacks tc = {
> > +		.callback = &kevent_timer_callback, 
> > +		.enqueue = &kevent_timer_enqueue, 
> > +		.dequeue = &kevent_timer_dequeue};
> 
> I think this should be static, and the normal style to write it would be:
> 
> static struct kevent_callbacks tc = {
> 	.callback	= kevent_timer_callback,
> 	.enqueue	= kevent_timer_enqueue,
> 	.dequeue	= kevent_timer_dequeue,
> };
> 
> also please consider makring all the kevent_callbacks structs const
> to avoid false cacheline sharing and accidental modification, similar
> to what we did to various other operation vectors.

Actually I do not think it should be static, since it is only used for
initialization and it's members are copied into main structure.

-- 
	Evgeniy Polyakov
-
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