[ovs-git] Open vSwitch: ovs-thread: New function ovsthread_id_self(). (master)

dev at openvswitch.org dev at openvswitch.org
Thu Aug 8 20:19:06 UTC 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  6878fada586a8ed5f45a50f9c8834dcf06bdc1f5 (commit)
       via  2ba4f163d9ea84aa8b8e9d8678371a70af766b5e (commit)
       via  9c4c45edc36b88bcb2956140965dbde9224ff967 (commit)
      from  ada3a58d1f81491b435d2b350a88d68318edd4ac (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6878fada586a8ed5f45a50f9c8834dcf06bdc1f5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6878fada586a8ed5f45a50f9c8834dcf06bdc1f5
Author: Ben Pfaff <blp at nicira.com>
		
ovs-thread: New function ovsthread_id_self().
		
I foresee a need for possibly large numbers of instances of "struct
seq" (which is introduced in an upcoming patch).  Each struct seq
needs some per-thread data.  POSIX has pthread_key_t for this, but
the number of keys can be fairly limited, to as few as 128.  It is
reasonable to work around this by using a hash table indexed on the
current thread.  That only works if one can get a thread identifier
that is hashable (pthread_t is not).  This patch introduces a
hashable thread identifier.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 2ba4f163d9ea84aa8b8e9d8678371a70af766b5e
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2ba4f163d9ea84aa8b8e9d8678371a70af766b5e
Author: Ben Pfaff <blp at nicira.com>
		
ovs-thread: Add support for globally visible per-thread data.
		
DEFINE_PER_THREAD_DATA always declared its data item as "static", meaning
that it was only directly visible within a single translation unit.
This commit adds additional forms of per-thread data that allow the data
to be accessible from multiple translation units.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 9c4c45edc36b88bcb2956140965dbde9224ff967
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9c4c45edc36b88bcb2956140965dbde9224ff967
Author: Ben Pfaff <blp at nicira.com>
		
ovs-thread: New function xpthread_setspecific().
		
Signed-off-by: Ben Pfaff <blp at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 lib/ovs-thread.c |   34 +++++++++++++++-
 lib/ovs-thread.h |  116 +++++++++++++++++++++++++++++++++++++++++++++---------
 lib/poll-loop.c  |    2 +-
 lib/random.c     |    2 +-
 lib/timeval.c    |    2 +-
 lib/util.c       |    4 +-
 lib/vlog.c       |    2 +-
 7 files changed, 138 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list