On Mon, Jul 22, 2013 at 09:10:52AM -0700, Alex Wang wrote:
> Looks good to me,
> 
> Want to ask question about "ovsthread_once_start()",
> 1. why do we have "ovsthread_once_start()" defined in header file?

The "fast path" for using ovsthread_once_start() is just a test and
conditional jump.  The alternative is a function call followed by a
test and a conditional jump.  I decided to use the former as an
optimization; it might have been premature.

> 2. if __check__ is defined, the macro function will override the
> previously defined "ovsthread_once_start()" function. Right?

Yes.

> 3. could you explain why you use "ovsthread_once_start()" rather than
> "pthread_once()" like in other patches (since the init function does not
> take
> any input argument)?

I thought it made the patch easier to read since the change was smaller.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to