From: Mathieu Desnoyers Date: Mon, 30 Sep 2013 18:40:33 +0000 (-0400) Subject: Fix: i386 compat code duplicated mutex instances X-Git-Tag: v0.9.0~140 X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=976720e446de1d3831bc7847b920c397a7ee26b1;hp=976720e446de1d3831bc7847b920c397a7ee26b1;ds=sidebyside Fix: i386 compat code duplicated mutex instances compat_arch_x86.c is linked into many .so and even into test programs. The basic problem with this is that it contains a statically defined mutex, which will fail to protect concurrent use of this compat code by different shared objects. Fix this by defining both the mutex (now called __urcu_x86_compat_mutex) and __rcu_cas_avail as weak symbols. Therefore, the first symbol that gets loaded in a program will by used by everyone. Reported-by: Vladimir Nikulichev Signed-off-by: Mathieu Desnoyers ---