ovs-thread: Add new support for thread-specific data.
authorBen Pfaff <blp@nicira.com>
Tue, 14 Jan 2014 22:35:48 +0000 (14:35 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 14 Jan 2014 22:45:10 +0000 (14:45 -0800)
commite9020da2d229a48296d829ac40eb4a374063ae49
tree7d446c1ac61834fe1f9e94910de948caba9d6f74
parented596d3a10ed0eab9aa0c48d5201b1b8046188cc
ovs-thread: Add new support for thread-specific data.

A couple of times I've wanted to create a dynamic data structure that has
thread-specific data, but I've not been able to do that because
PTHREAD_KEYS_MAX is so low (POSIX says at least 128, glibc is only a little
bigger at 1024).  This commit introduces a new form of thread-specific data
that supports a large number of items.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/ovs-thread.c
lib/ovs-thread.h