2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

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@nicira.com>
This commit is contained in:
Ben Pfaff
2013-08-06 14:40:25 -07:00
parent 9c4c45edc3
commit 2ba4f163d9
5 changed files with 84 additions and 20 deletions

View File

@@ -39,7 +39,7 @@
* cryptographic-quality randomness. */
/* Current random state. */
DEFINE_PER_THREAD_DATA(uint32_t, seed, 0);
DEFINE_STATIC_PER_THREAD_DATA(uint32_t, seed, 0);
static uint32_t random_next(void);