Re: [ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-25 Thread Ben Pfaff
Thanks, I went with that. On Tue, Jun 25, 2013 at 01:09:47PM -0700, Ethan Jackson wrote: > I like NAME_get_unsafe() personally. > > Thanks, > > Ethan > > On Tue, Jun 25, 2013 at 1:05 PM, Ben Pfaff wrote: > > On Tue, Jun 25, 2013 at 12:56:09PM -0700, Ethan Jackson wrote: > >> I don't really lik

Re: [ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-25 Thread Ethan Jackson
I like NAME_get_unsafe() personally. Thanks, Ethan On Tue, Jun 25, 2013 at 1:05 PM, Ben Pfaff wrote: > On Tue, Jun 25, 2013 at 12:56:09PM -0700, Ethan Jackson wrote: >> I don't really like the names of the functions "NAME_get" and >> "NAME_get__" could we come up with something that's a bit mo

Re: [ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-25 Thread Ben Pfaff
On Tue, Jun 25, 2013 at 12:56:09PM -0700, Ethan Jackson wrote: > I don't really like the names of the functions "NAME_get" and > "NAME_get__" could we come up with something that's a bit more > specific about the difference between them? Maybe get_init and get? > I'm not sure what would be best .

Re: [ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-25 Thread Ethan Jackson
I don't really like the names of the functions "NAME_get" and "NAME_get__" could we come up with something that's a bit more specific about the difference between them? Maybe get_init and get? I'm not sure what would be best . . . Acked-by: Ethan Jackson On Mon, Jun 24, 2013 at 10:51 AM, Ben P

Re: [ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-24 Thread Ben Pfaff
On Fri, Jun 21, 2013 at 09:40:32AM -0400, Ed Maste wrote: > On 20 June 2013 20:10, Ben Pfaff wrote: > > Can you confirm that the autoconf test needs #include but > > the actual program doesn't? It looks funny. > > Yes. It looks like it should be added in the actual program; right > wow we end

Re: [ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-21 Thread Ed Maste
On 20 June 2013 20:10, Ben Pfaff wrote: > Can you confirm that the autoconf test needs #include but > the actual program doesn't? It looks funny. Yes. It looks like it should be added in the actual program; right wow we end up with the definition leaking from another header. __

Re: [ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-20 Thread Ben Pfaff
On Thu, Jun 20, 2013 at 07:49:18PM -0400, Ed Maste wrote: > On 20 June 2013 16:18, Ben Pfaff wrote: > > On Wed, Jun 19, 2013 at 01:17:03PM -0700, Ben Pfaff wrote: > >> POSIX defines a portable pthread_key_t API for per-thread data. GCC and > >> C11 have two different forms of per-thread data that

Re: [ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-20 Thread Ed Maste
On 20 June 2013 16:18, Ben Pfaff wrote: > On Wed, Jun 19, 2013 at 01:17:03PM -0700, Ben Pfaff wrote: >> POSIX defines a portable pthread_key_t API for per-thread data. GCC and >> C11 have two different forms of per-thread data that are generally faster >> than the POSIX API, where they are availa

Re: [ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-20 Thread Ben Pfaff
On Wed, Jun 19, 2013 at 01:17:03PM -0700, Ben Pfaff wrote: > POSIX defines a portable pthread_key_t API for per-thread data. GCC and > C11 have two different forms of per-thread data that are generally faster > than the POSIX API, where they are available. This commit adds a > macro-based wrapper

[ovs-dev] [threads 02/11] ovs-thread: Add per-thread data support.

2013-06-19 Thread Ben Pfaff
POSIX defines a portable pthread_key_t API for per-thread data. GCC and C11 have two different forms of per-thread data that are generally faster than the POSIX API, where they are available. This commit adds a macro-based wrapper, DEFINE_PER_THREAD_DATA, that takes advantage of the GCC extension