]> git.ozlabs.org Git - ccan/commitdiff
altstack: Consolidate thread-local variables
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 3 Jun 2016 08:41:59 +0000 (18:41 +1000)
committerDan Good <dan@dancancode.com>
Thu, 16 Jun 2016 20:18:52 +0000 (20:18 +0000)
altstack uses a number of __thread variables to track internal state.  This
allows altstack to be thread-safe, although it's still not re-entrant.
This patch gathers all these variables into a single per-thread state
structure.  This makes it easy to see at a glance what the whole of the
required state is, and thereby easier to reason about correctness of
changes to the implementation.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

No differences found