[ovs-dev] [threads 02/23] ofp-msgs: Make thread-safe.

Ben Pfaff blp at nicira.com
Mon Jul 22 17:39:23 UTC 2013


On Mon, Jul 22, 2013 at 10:35:27AM -0700, Alex Wang wrote:
> On Mon, Jul 22, 2013 at 10:23 AM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > 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.
> 
> Still not clear about, why there is no function call when defining the
> function in header file. This is different to having "inline" function,
> right?

ovsthread_once_start() is defined as an inline function.



More information about the dev mailing list