MEDIUM: thread/vars: Make vars thread-safe
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 24 Jul 2017 14:30:34 +0000 (16:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 12:58:32 +0000 (13:58 +0100)
commite95f2c3ef5489143286e89b288d4950c1d95eb21
tree327a5cfa748d4b76d84f30be93f0f8d04f023b7c
parent94b712337d40c6b5bdf54c18025af1caf06ca7ac
MEDIUM: thread/vars: Make vars thread-safe

A RW lock has been added to the vars structure to protect each list of
variables. And a global RW lock is used to protect registered names.

When a varibable is fetched, we duplicate sample data because the variable could
be modified by another thread.
include/common/hathreads.h
include/types/vars.h
src/vars.c